ASP.NET MVC - Setup Debugging Framework Source Code | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (173).NET Core  (29).NET MAUI  (203)Angular  (107)ASP.NET  (51)ASP.NET Core  (82)ASP.NET MVC  (89)Azure  (40)Black Friday Deal  (1)Blazor  (211)BoldSign  (13)DocIO  (24)Essential JS 2  (106)Essential Studio  (200)File Formats  (65)Flutter  (132)JavaScript  (219)Microsoft  (118)PDF  (81)Python  (1)React  (98)Streamlit  (1)Succinctly series  (131)Syncfusion  (897)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (50)Windows Forms  (61)WinUI  (68)WPF  (157)Xamarin  (161)XlsIO  (35)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (8)Business intelligence  (55)Button  (4)C#  (146)Chart  (127)Cloud  (15)Company  (443)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (63)Development  (618)Doc  (8)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (39)Extensions  (22)File Manager  (6)Gantt  (18)Gauge  (12)Git  (5)Grid  (31)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (501)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (42)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (12)Road Map  (12)Scheduler  (52)Security  (3)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (31)Solution Services  (4)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (381)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (17)Web  (582)What's new  (323)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)

ASP.NET MVC – Setup Debugging Framework Source Code

As you are aware, complete source code for the ASP.NET MVC Framework is available on CodePlex. If you have not already done so, please download the source from CodePlex. With the source and a little setup, you can debug right into the framework’s source. This is often very useful when troubleshooting pesky issues.

In order to setup debugging please follow the procedure below.

    1. Remove your project’s reference to system.web.mvc.
    2. Add the project System.Web.Mvc.csproj, available under MVCsrcSystemWebMvc (relative to the folder where you unzipped the source code), to your solution.
    3. Add a reference to the project you just added to your main ASP.NET MVC application project (as a project reference). This reference replaces your original system.web.mvc assembly reference.
    4. Uncomment the reference to System.Web.Mvc in your web.config file as shown below.

       

      <compilation debug="true">
      
      <assemblies>
      
      <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      
      <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      
      <add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      
      <add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      
      <!--<add assembly="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>-->
      
      <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      
      <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"/>
      
      </assemblies>
      
      </compilation>
      • Locate the web.config file available under the Views folder and replace all PublicKeyToken instances under the pages node with null (original value will be 31BF3856AD364E35) as shown below.
      <pages
      
      validateRequest="false"
      
      pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
      
      pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
      
      userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
      
      <controls>
      
      <add assembly="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" namespace="System.Web.Mvc" tagPrefix="mvc" />
      
      </controls>
      
      </pages>

      You should now be able to debug into the ASP.NET MVC source code. Please do remember to reverse these steps when deploying your project.

      ASP.NET Futures Assembly

      If you are using the ASP.NET futures assembly, you can add a reference to this assembly also and debug without any additional changes. The source code for the futures assembly is installed under MVCsrcMvcFutures along with the ASP.NET MVC source code.

      Tags:

      Share this post:

      Comments (6)

      Jul 22, 2010hanx once more for a pleasant site.

      I enjoy seeing websites that understand about my search. I truly loved your site. I hope I find new article in this site. Thanks

      Valuable site, where did u come up with the information on this posting? I am happy I discovered it though, ill be checking back soon to see what added content u have.

      One has to assume by it earlier than coming to a conclusion on about it,stunning web site I like the header.

      Good day, good day. Nice post. You may have gained a brand new reader. Pls stick with it and I look forward to extra of your excellent blog posts. Greets, Jessica.

      google sniper by george brown
      google sniper by george brown

      I came here through a search in Google and your site gave me just the right information

      Comments are closed.

      Popular Now

      Be the first to get updates

      Subscribe RSS feed