Display Stack Trace in Sharepoint 2010

Ashok Raja
 
Solutions Architect
June 10, 2012
 
Rate this article
 
Views
303

Enabling display of stack trace information in SharePoint 2010 is bit different when compared to SharePoint 2007. In SharePoint 2010 it can be categorized into two types based on page type.

  1. Displaying trace information for Site Pages
  2. Displaying trace information for Application Pages

To know more about Site Pages and Application pages refer this link in msdn

To begin with, first change the callstack property in web.config file of the concerned web application to true. This callstack property is an attribute of safemode element located somewhere between line number 50 to 60 in the web.config depending on your configuration.

<SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">

The next step is to set the Custom Errors Mode to off. Based on the page type the location of web.config to look for will change.

For Site Pages this attribute has to be set to off in the web.config of the concerned web application, usually located in [Drive:] \inetpub\wwwroot\wss\VirtualDirectories\[PortNumber].

For Application Pages, this entry has to be changed in the web.config file located in 14\TEMPLATE\LAYOUTS folder. To view stack trace of error while feature activation or deactivation requires this change in web.config located in layouts folder.

Category : SharePoint 2010, Tips

Author Info

Ashok Raja
 
Solutions Architect
 
Rate this article
 
I am Ashok Raja, Share Point Consultant and Architect based out of Chennai, India. ...read more
 

Leave a comment