Debug the source code of MVC

Source: Internet
Author: User

1. Download the MVCSource code

MVC2 SourceCodeAddress: http://aspnet.codeplex.com/releases/view/41742

Mvc3 Source Code address is: http://aspnet.codeplex.com/releases/view/58781

2. decompress the source codeProgramUnder the root directory

3. delete system. Web. MVC reference

4. Add project reference system. Web. MVC. csproj in mvc2-rtm-sources \ SRC \ systemwebmvc

5. modify the configuration file

Web. config in the root directory

<Add Assembly = "system. Web. MVC version = 2.0.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35"/>

Change

<Add Assembly = "system. Web. MVC, version = 2.0.0.0, culture = neutral, publickeytoken = NULL"/>

<Runtime>
<Assemblybinding xmlns = "urn: Schemas-Microsoft-com: ASM. V1">
<Dependentassembly>
<Assemblyidentity name = "system. Web. MVC" publickeytoken = "31bf3856ad364e35"/>
<Bindingredirect oldversion = "1.0.0.0" newversion = "2.0.0.0"/>
</Dependentassembly>
</Assemblybinding>
</Runtime>

Change

<Runtime>
<Assemblybinding xmlns = "urn: Schemas-Microsoft-com: ASM. V1">
<Dependentassembly>
<Assemblyidentity name = "system. Web. MVC" publickeytoken = "null"/>
<Bindingredirect oldversion = "1.0.0.0" newversion = "2.0.0.0"/>
</Dependentassembly>
</Assemblybinding>
</Runtime>

 

Web. config under views

validaterequest = "false"
pageparserfiltertype = "system. web. MVC. viewtypeparserfilter, system. web. MVC, version = 2.0.0.0, culture = neutral, publickeytoken = NULL "
pagebasetype =" system. web. MVC. viewpage, system. web. MVC, version = 2.0.0.0, culture = neutral, publickeytoken = NULL "
usercontrolbasetype =" system. web. MVC. viewusercontrol, system. web. MVC, version = 2.0.0.0, culture = neutral, publickeytoken = NULL ">



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.