SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

SharePoint under the hood - see real error description and callstack/stack trace
I have always loved the nice SharePoint error messages that are presented when something goes wrong. My most popular error message is "An unknown error occured. Please contact your system administrator.".
 
In order to see the real error messages as well as the stack trace of where the error happened within SharePoint, you have to do two simple things - in fact, this is mainly standard ASP.NET business:
 
In the web.config file of your SharePoint web application, edit these two entries:
 

1. Switch custom errors off

<system.web>
...
<customErrors mode="On" />
...
</system.web>

Set the value "On" to "Off" in a development or staging environment, or to "RemoteOnly" if you have to troubleshoot an issue in a productive environment (of course, the error has to be reproduced locally in this case).
 

2. Enable CallStack

<SharePoint>
...
<SafeMode MaxControls="50" CallStack="false" />
...
</SharePoint>
 
To make the CallStack visible, set the value to "true".
 
Please note that changing the web.config will cause SharePoint to restart the whole web application immediately after saving.
 
This little nice-to-know works for both, MOSS 2007 and WSS 3.0.
 
Happy troubleshooting!
 

Posted 06-28-2007 2:18 PM by mhofer1976

Comments

Links (6/28/2007) « Steve Pietrek’s SharePoint Stuff wrote Links (6/28/2007) &laquo; Steve Pietrek&#8217;s SharePoint Stuff
on 06-28-2007 8:39 PM

Pingback from  Links (6/28/2007) &laquo; Steve Pietrek&#8217;s SharePoint Stuff

Sharepoint link love 06-29-2007 at Virtual Generations wrote Sharepoint link love 06-29-2007 at Virtual Generations
on 06-29-2007 5:00 AM

Pingback from  Sharepoint link love 06-29-2007 at  Virtual Generations

dhichawla wrote re: SharePoint under the hood - see real error description and callstack/stack trace
on 07-16-2007 1:08 PM

Hi..

I have migrated a web application from WSS v2.0(on one server) to MOSS 2007(on other server). Somehow, the default page of all the subsites that have migrated do not open up..with the same favorite error...

When, I go to enable the above settings in the web.config file, I cannot find the <SafeMode> tag...and when I add it..it gives me the following error:

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unrecognized configuration section SharePoint.

Source Error:

Line 78: </system.web>

Line 79:

Line 80: <SharePoint>

Line 81: <SafeMode MaxControls="50" CallStack="true" />

Line 82: </SharePoint>

Source File: ....\web.config    Line: 80

Is this because of "Sharepoint" tag not being defined for WSS v2.0..

Please can u suggest a way I can get this thing solved...I am stuck with it ..

Stark wrote re: SharePoint under the hood - see real error description and callstack/stack trace
on 08-21-2007 10:38 AM

You also need to enable debug mode

Data Cogs Information Technology wrote SharePoint - output more descriptive error message
on 08-30-2007 8:23 PM
Data Cogs Information Technology wrote SharePoint - output more descriptive error message
on 08-30-2007 8:24 PM
Mirrored Blogs wrote MOSS: Debugging
on 01-23-2008 6:24 PM

The debugging process in MOSS is challenging, to say the least, especially if your &quot;development&quot;

J. Greg’s Brain Corral » Blog Archive » Setting up Inverness - the External Collaboration Toolkit for SharePoint wrote J. Greg&#8217;s Brain Corral &raquo; Blog Archive &raquo; Setting up Inverness - the External Collaboration Toolkit for SharePoint
on 03-31-2008 4:03 PM

Pingback from  J. Greg&#8217;s Brain Corral  &raquo; Blog Archive   &raquo; Setting up Inverness - the External Collaboration Toolkit for SharePoint

edi wrote re: SharePoint under the hood - see real error description and callstack/stack trace
on 08-25-2008 11:02 AM

Hi i have one problem with opening my form with in the sharepoint administrator web    is Infopath form i have in my share folder and when i click to open first i could open it but later i can it shows me and messege that said The form cannot be displayed because session state is not available.  how can i fix these error can some one help me out edi_munoz@hotmail.com thank  you very mutch i been looking but no answer any way

... wrote re: SharePoint under the hood - see real error description and callstack/stack trace
on 03-06-2009 7:48 AM

Interessante Informationen.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.