Seeing Full Error Messages


Everyone remember getting frustrated by SharePoint’s “An unexpected error has occurred” that gets displayed by default when something goes wrong in SharePoint?  Well it still happens in SP2010, but the good news is the same fix takes care of it.

For those of you that haven’t come across the fix for this, it requires an edit to the web.config for the web application you are getting the error on.  Typically we do this on development and QA servers.  If you’re doing it in a farm, remember that you need to do the change to all front-end servers, or guarantee that you are hitting a specific web front-end.

The web.config is found in the home directory for the web application.  This is typically c:\inetpub\wwwroot\wss\VirtualDirectories and then the folder for your web application.  To see the full errors make the following two changes.  Opening the web.config in Notepad and searching for the tags (there is only one for each) is the easiest way to do this.

  • Set: CustomErrors="Off"
  • Set: CallStack="true"

Once you’ve done this change, you’ll see the full .NET error details and call stack for the error that occurred.

Latest Articles