Wednesday, June 23, 2010

Sharepoint “An unexpected error has occurred”

By design in SharePoint if an error occurs the user is shown a generic error message “An unexpected error has occurred”. The detailed error messages are turned off for security reasons.

Here's how to get the full error messages

  1. Go to the SP site you want to enable it for.
    For example C:\Inetpub\wwwroot\wss\VirtualDirectories\mySPsite.com80
  2. Open the web.config for editing.
  3. Find out the following entry
    safemode maxcontrols="200" callstack="false" directfiledependencies="10" totalfiledependencies="50" allowpageleveltrace="false"

    And make following changes to it

    safemode maxcontrols="200" callstack="true" directfiledependencies="10" totalfiledependencies="50" allowpageleveltrace="true"

    And
    customerrors mode="On"

    To
    customerrors mode="Off"

  4. Save and close web.config.

No comments:

Post a Comment