Remove Unused View Engines

By default, ASP.NET MVC loads both the Razor and Web Forms View Engines. This can cause performance issues. Because ASP.NET will look for Web Forms views first, and switch to look for Razor views if Web Forms views cannot be found.

This can be resolved easily by adding the following 2 lines to the Application_Start method in Global.asax.cs.

ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new RazorViewEngine());
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s