MVC and View Engines

If you’re coding MVC and using the Razor view engine exclusively, consider changing the default behavior of your ASP.NET web application by modifying the Global.asax.cs’s Application_Start and adding the following lines at the top of the routine:

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

By default, both the WebForms and Razor processor are created. The above clears the engines out and then adds back only the Razor view engine. This will increase the performance of your site by not running your pages through the WebForms processor first.