Enabling full stack dumps (detailed error messages) on ASP.NET and SharePoint

When an error occurs within SharePoint, the application by default will not display a detailed error message to the end user (this is done for security reasons).  When you’re actively configuring/developing your SharePoint platform, it is sometimes useful to display detailed error messages.  

Here are the steps to do it:

You must edit several “web.config” files:

1. Each SharePoint web application you created will have its own “web.config”.  You can find these in the respective folders under “C:\inetpub\wwwroot\wss\VirtualDirectories”.

In the XML section <system.web> you have two changes to make:               

CHANGE #1:  <customErrors mode=”Off” />

( This is normally set to “On” so change it to “Off”)           

CHANGE #2:  <compilation batch=”false” debug=”true”>

(The ‘debug’ attribute is normally set to “false” so change it to “true”)
               
In the XML section <SharePoint> you have a single change to make:
CHANGE #3:  <SafeMode MaxControls=”200″ CallStack=”true”…>

(The ‘CallStack’ attribute is normally set to “false” so change it to “true”)

Remember, you must make these THREE changes in EACH of the web.config files found in the folder for each of your web applications!

2. You must also change the “web.config” that is global to SharePoint (ie:  applies to all web applications).  This file is located here:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config

In the XML section <system.web> you have a single change to make:
CHANGE #1:  <customErrors mode=”Off” />

(This is normally set to “On” so change it to “Off”)

*** Thanks go to David Biersach for providing detailed background information for this post. ***

Advertisements

0 Responses to “Enabling full stack dumps (detailed error messages) on ASP.NET and SharePoint”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




RSS Information Week Headlines

  • An error has occurred; the feed is probably down. Try again later.

RSS SharePoint Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS InfoPath Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Joel Oleson Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Susan Hanley’s KM Blog

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 355,172 hits

%d bloggers like this: