Remove Unused View Engines
If you’re an ASP.NET MVC developer, you might not know that ASP.NET still loads the View Engines for both Razor and Web Forms by default. This can cause performance issues because MVC will normally look for Web Forms views first, before switching over to the Razor views if it can’t find them.
You can quickly eliminate this performance issue by adding the following two lines to your Global.asax, in the Application_Start():
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new RazorViewEngine());
Goodbye Web Forms View Engine!
Leave a Comment
Your email address will not be published. Required fields are marked *