Saturday, November 24, 2007

How do I enable more detailed error messages in SharePoint 2007 for debugging purposes?

The error messages generated by SharePoint 2007 are not very useful. If you are doing some serious development work in SharePoint you will need to temporarily enable error messages. This is done by making the following changes to your web.config file:
1) Change the "CallStack" attribute in the <SafeMode> element from "false" to "true".
<SafeMode MaxControls="200" CallStack="true"

DirectFileDependencies="10"

TotalFileDependencies="50"

AllowPageLevelTrace="false">

2) Change the "mode" attribute in the <customErrors> element from "On" to "Off".
<customErrors mode="Off" />

No comments:

Post a Comment