ASP.NET MVC - Setup Debugging Framework Source Code | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (182).NET Core  (26).NET MAUI  (233)Angular  (115)ASP.NET  (49)ASP.NET Core  (80)ASP.NET MVC  (85)Azure  (42)Black Friday Deal  (1)Blazor  (243)BoldSign  (15)DocIO  (24)Essential JS 2  (108)Essential Studio  (198)File Formats  (73)Flutter  (140)JavaScript  (227)Microsoft  (121)PDF  (86)Python  (1)React  (107)Streamlit  (1)Succinctly series  (131)Syncfusion  (988)TypeScript  (32)Uno Platform  (3)UWP  (3)Vue  (45)Webinar  (54)Windows Forms  (59)WinUI  (72)Word  (18)WPF  (165)Xamarin  (159)XlsIO  (38)Other CategoriesBarcode  (5)BI  (29)Bold BI  (8)Bold Reports  (2)Build conference  (11)Business intelligence  (55)Button  (4)C#  (164)Chart  (154)Chart of the week  (62)Cloud  (16)Company  (440)Dashboard  (8)Data Science  (3)Data Validation  (8)DataGrid  (74)Development  (696)Doc  (7)DockingManager  (1)eBook  (99)Enterprise  (22)Entity Framework  (7)Essential Tools  (13)Excel  (47)Extensions  (31)File Manager  (8)Gantt  (23)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  (530)Mobile MVC  (9)OLAP server  (2)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (48)Performance  (13)PHP  (2)PivotGrid  (5)Predictive Analytics  (6)Report Server  (3)Reporting  (8)Reporting / Back Office  (9)Rich Text Editor  (12)Road Map  (12)Scheduler  (54)Security  (5)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (32)Solution Services  (4)Spreadsheet  (11)SQL  (15)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (112)UI  (426)Uncategorized  (68)Unix  (2)User interface  (67)Visual State Manager  (2)Visual Studio  (31)Visual Studio Code  (19)Web  (650)What's new  (355)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">
      <add assembly="System.Core, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      <add assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add assembly="System.Web.Abstractions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add assembly="System.Web.Routing, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <!--<add assembly="System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>-->
      <add assembly="System.Data.DataSetExtensions, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      <add assembly="System.Xml.Linq, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      <add assembly="System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      • 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.
      pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=null"
      pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=null"
      userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=null">
      <add assembly="System.Web.Mvc, Version=, Culture=neutral, PublicKeyToken=null" namespace="System.Web.Mvc" tagPrefix="mvc" />

      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.


      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