in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Michael Hofer - SharePoint Blog

Michael Hofer's blog about adventures in SharePoint land, including tips and tricks for all products and technologies used in Information Worker solutions.

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!
 

Comments

 

Links (6/28/2007) « Steve Pietrek’s SharePoint Stuff said:

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

June 28, 2007 8:39 PM
 

Sharepoint link love 06-29-2007 at Virtual Generations said:

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

June 29, 2007 5:00 AM
 

dhichawla said:

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 ..

July 16, 2007 1:08 PM
 

Stark said:

You also need to enable debug mode

August 21, 2007 10:38 AM
 

Data Cogs Information Technology said:

August 30, 2007 8:23 PM
 

Data Cogs Information Technology said:

August 30, 2007 8:24 PM
 

Mirrored Blogs said:

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

January 23, 2008 6:24 PM
 

J. Greg’s Brain Corral » Blog Archive » Setting up Inverness - the External Collaboration Toolkit for SharePoint said:

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

March 31, 2008 4:03 PM
 

edi said:

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

August 25, 2008 11:02 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

About mhofer1976

For all of my IT carreer, I've been addicted to Microsoft-based software development, starting with VB, but then heading straight towards the .NET Framework in its earliest days. While working in different positions as a lead developer, project manager, pre-sales consultant and most recently a business unit manager, I've always kept beeing a developer and specialized on solutions in the Information Worker area, with an emphasis towards Enterprise Content Management. The Microsoft Office System and especially the SharePoint products and technologies are my favorite "playground", one big reason why I've joined the Microsoft Consulting Services in Switzerland where I'm currently working as Senior Consultant for Information Worker solutions.

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts