How to use one unique _viewstart.cshtml to all views and areas/views? I already move my _viewstart to root of the my site, but when I did this happened this error “Unable to cast object of type ‘ASP._ViewStart_vbhtml’ to type ‘System.Web.WebPages.StartPage’.”. My .configs are be inside /views folder. What’s the problem?
How to use one unique _viewstart.cshtml to all views and areas/views? I already move
Share
I’m pretty sure you can’t put the _ViewStart in the root of your site. The ViewEngine looks for ViewStart in the Views folder. So the only way to share the same ViewStart would be to use a hardlink and make the same file appear in both folders.