Reputation: 5933
I have converted a site over entirely to Razor and want it to ignore any residual .aspx files. These have caused problems by
I would like to tell the entire site to stop processing ASPX or ASCX pages and only use Razor views.
Upvotes: 4
Views: 898
Reputation: 46018
Add following to Global.asax.cs
protected void Application_Start()
{
ViewEngines.Engines.Clear();
ViewEngines.Engines.Add(new RazorViewEngine());
}
By default a WebFormViewEngine
is included BEFORE RazorViewEngine
.
Upvotes: 4