Tuesday, June 17, 2008

Enable Detailed Error Messages in SharePoint

Often times people will cause errors in SharePoint when doing some advanced editing of web parts. The error message that is displayed is very generic and does not give any technical information. To display the technical details, the SharePoint administrator has to do the following:

  1. On the IIS server (web server) navigate to the virtual directories (default is c:\inetpub\wwwroot\wss\VirtualDirectories\, but a "good" installation will be in a different place (Hopefully a drive other than the system partition)
  2. Open the Web.Config file in a text editor (most times notpad.exe, but I recommend NotePad2)
  3. Search (find in notepad) for the safemode tag using "CallStack" and change the CallStack status to trueCallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
  4. Search for the CustomErrors tag and set the mode to Offmode="Off" />
  5. Save and close.
This will then show detailed error messages. One thing to note, is that "Off" is case-sensitive. If at all possible, you should only do this in a non-production environment. ALso, highly recommend making a backup of the web.config file before you modify it. Often times I will copy the web.config file then copy it back to put the settings back to default.

No comments: