Debugging SharePoint Errors
The following is a must have when developing on SharePoint. Unfortunately the SharePoint Custom Error page does not provide a great deal of information as to the cause of the error. Typical SharePoint Errors area “File Not Found”, “An Error occurred please contact the system administrator”. Unfortunately for the system administrator / developer these messages are not particular helpful. Fortunately it is easy enough to get a more descriptive error message, that should hopefully see you on your way to resolving the error.
1. Open the Web.Config file for the web application that you want to debug. The default location for the Web.Config files is C:\Inetpub\wwwroot\wss\VirtualDirectories\[Web Application Name]
2. Change CallStack from false to true – XPath = “Configuration\SharePoint\SafeMode”
<SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false"> <PageParserPaths> </PageParserPaths></SafeMode>
3. Change CustomErrors Mode from On to Off – XPath = “Configuration\System.Web”
<customErrors mode="Off" />