By default, only the reference of the LINQ assembly is added to Web. config generated in MVC. If Entity Framework (EF) is used as the orm of MVC, you need to add the Assembly reference in webconfig:
For example:
<Assemblies>
......
<Add Assembly = "system. xml. LINQ, version = 3.5.0.0, culture = neutral, publickeytoken = b77a5c561934e089"/>
<Add Assembly = "system. Data. LINQ, version = 3.5.0.0, culture = neutral, publickeytoken = b77a5c561934e089"/>
<Add Assembly = "system. Data. entity, version = 3.5.0.0, culture = neutral, publickeytoken = b77a5c561934e089"/>
</Assemblies>
Asp.net MVC 2 cocould not load type 'System. Web. MVC. viewpage <dynamic> 'error Solution
If problems such as cocould not load type 'System. Web. MVC. viewpage <dynamic> 'occur. Add pageparserfiltertype, pagebasetype, and usercontrolbasetype to the pages node under the system. Web node in the web. config file, as follows:
Code
<System. Web>
<Pages pageparserfiltertype = "system. Web. MVC. viewtypeparserfilter, system. Web. MVC, version = 2.0.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35"
Pagebasetype = "system. Web. MVC. viewpage, system. Web. MVC, version = 2.0.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35"
Usercontrolbasetype = "system. Web. MVC. viewusercontrol, system. Web. MVC, version = 2.0.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35">
</Pages>
</System. Web>
If problems such as cocould not load type 'System. Web. MVC. viewpage <dynamic> 'occur. Add pageparserfiltertype, pagebasetype, and usercontrolbasetype to the pages node under the system. Web node in the web. config file, as follows:
Code
<System. Web>
<Pages pageparserfiltertype = "system. Web. MVC. viewtypeparserfilter, system. Web. MVC, version = 2.0.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35"
Pagebasetype = "system. Web. MVC. viewpage, system. Web. MVC, version = 2.0.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35"
Usercontrolbasetype = "system. Web. MVC. viewusercontrol, system. Web. MVC, version = 2.0.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35">
</Pages>
</System. Web>