Enabling Meaningful Errors in SharePoint 2010

Thanks to Rez’s blog spot for this one. Here’s how to get replace the “Unexpected Error Has Occurred” message with some ASP.NET debug code that you might be able to use to resolve whatever problem you’re having.

Edit the web.config of your SharePoint application – should be found in

drive:inetpubwwwrootwssVirtualDirectories<port>

Set the following values:

  1. Debug=”true” instead of the default of Debug=”false” (do a find on “debug”)
  2. CallStack=”true” instead of the default of CallStack=”false” (do a find on “callstack”)
  3. customErrors=”Off” instead of the default of customErrors=”On” (do a find on “customErrors”)

Finally, open the web.config file found at

drive:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14TemplateLAYOUTS

And change the value of customErrors to “Off”.

After an IISReset, you should see better errors.

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.