Hours of debugging and wondering what was going on with certain Views not loading, I traced down this awesome post and had to re-post it for anyone else who might be experiencing this particular pain…
Problem:
Parser Error Message: Could not load type ‘System.Web.Mvc.ViewPage<…>’.
You’ve checked your references, the view, the controller… what’s the deal?
Solution:
Missing in your “Views/web.config” “pages” element:
<pages validateRequest="false" pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> <controls> <add assembly="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" /> </controls> </pages>
Related Solution:
If you created the project using an RC or Beta, you may need to recreate it using the final version 1.0 as a few things changed and may contribute to this or other issues. I had to do this since I started the project before I installed 1.0
Links:
Update :-\
After referencing the MVC Futures DLL, this solution stopped working for me, I have now had to resort to copying the “Views” web.config into every subfolder under Views. Not sure if it’s related. How Annoying!
Good luck.

















Be The First To Comment
Related Post
Please Leave Your Comments Below