How do I stop MVC5 RenderAction looking for .aspx files

Viewed 506

I added MVC to my existing webforms project. All is going well except for RenderAction is looking for .aspx files

The view '_Mainmenu.cshtml' or its master was not found or no view engine supports the searched locations. The following locations were searched:

~/Areas/NewPages/Views/Shared/_Mainmenu.cshtml.ascx

The view is

~/Areas/NewPages/Views/Shared/_Mainmenu.cshtml

And it does exist in that folder. Can anybody help me sort this out. Everything else MVC is working OK I even have PITA EntityFramework working too

Any help would be appreciated

2 Answers

In the "Global.asax" file, find "Application_Start()"

Then, Please input this code --

RemoveWebFormEngines();

Related