Asp.net MVC fails to load the "system. Web. MVC. viewpage" type.

Source: Internet
Author: User
Analyzer Error

Note:An error occurred while analyzing the resources required to provide services to this request. Check the following detailed analysis error information and modify the source file as appropriate.

Analyzer error message:The system. Web. MVC. viewpage <dynamic> type cannot be loaded ".

Source error:

Row 1: <% @ page Language = "C #" inherits = "system. Web. MVC. viewpage <dynamic>" %> Row 2: Row 3: <! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source file:/Basisplatform/views/home/login. aspxRow:1

Version:Microsoft. NET Framework Version: 4.0.30319; ASP. NET version: 4.0.30319.1

The solution is to add a segment in the pages of the web. config node.
Validaterequest = "false"
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"

For example:

XML/html code

    • <Pages
    • Validaterequest = "false"
    • 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"
    • >
    • <Namespaces>
    • <Add namespace = "system. Web. MVC"/>
    • <Add namespace = "system. Web. MVC. Ajax"/>
    • <Add namespace = "system. Web. MVC. html"/>
    • <Add namespace = "system. Web. Routing"/>
    • </Namespaces>
    • </Pages>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.