How To Enable ASP.NET Debugging Web Parts and SharePoint Solutions

Thursday, March 8, 2007, 10:51
This news item was posted in Site News category and has 1 Comment so far.

We all make mistakes and its always helpful to get a second opinion. You need to enable debugging for either errors in our code or wanting to see the execution.

Debugging is a programmers best friend and a bug’s worst enemy.

To enable ASP.NET debugging

  1. Browse to the set of virtual directories for Windows SharePoint Services. Just remember, you cannot access the web.config file via your web browser as security restrictions set by IIS.

    For example, c:\Inetpub\wwwroot\wss\VirtualDirectories.

  2. For each virtual directory
    1. Open the web.config file contained in the virtual directory.
    2. Change <compilation batch=”false” debug=”false“> to <compilation batch=”false” debug=”true“>.
    3. Change <customErrors mode=”On“/> to <customErrors mode=”Off“/>
    4. Change <SafeMode MaxControls=”200″ CallStack=”false” …/> to <SafeMode MaxControls=”200″ CallStack=”true” …/>
    5. Save the web.config file.
  3. Open a command prompt and type iisreset to restart the server.

References:

Related Posts:

  • Quick Tip: Could not load file or assembly System.Web.Silverlight.dll
  • Had a collegue of mine who was working with the Silverlight Blueprint for SharePoint and after installing one of the examples, received a Server Error. At
  • Debugging iFilters in MOSS/WSS
  • The steps we use to debug searchfilters with MOSS/ WSS are listed below: Disable filter host termination, add Assert to suspend filter host when it starts: MOSS
  • Debugging SharePoint 2007 Web Parts and Workflows
  • Quick Links: Tan Tielens Debug Tip for SharePoint Web Parts Learn how to use Microsoft Visual Studio .NET to debug an existing Web Part assembly How to: Debug
  • Latest SharePoint News 03.28.08
  • Hopefully you have realized that Microsoft SharePoint is taking business by storm, and can start preparing to learn more about it.  Here are the latest
  • SharepointHQ.com launches compliments of ThinkNet
  • ThinkNet Inc., a leading provider of risk-free solutions for business, today announced it has formed a separate company built around the Microsoft® SharePoint Server platform.
    Both comments and pings are currently closed.

    One Response to “How To Enable ASP.NET Debugging Web Parts and SharePoint Solutions”

    1. Shared Points for SharePoint... : How To: Creating a VS web application below a SharePoint IIS web application said on Wednesday, October 1, 2008, 22:26

      [...] Enable debuging in the web.config file. [...]