Web.config Changes for Debugging ASPX Page’s Codebehind in SharePoint 

Tags: IT Pro, How To, Pre SharePoint 2010, Dev, SharePoint 2010

Instead of getting the "user-friendly", but frustrating-to-a-developer message "An error has occurred", use these two steps to receive the actual error when developing in SharePoint. Works for both MOSS and WSS.

  1. Show the call stack
    Change
    <SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
    to
    <SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">
  2. Set custom errors to False
    Change

    <customErrors mode="On" />
    to
    <customErrors mode="Off" />

 
Posted by AndyGett on 4-Jan-09
0 Comments  |  Trackback Url | Bookmark this post with:        
 

Comments

Name:
URL:
Email:
Comments: