Posted tagged ‘debugging’

SharePoint Unexpected Error has Occured, Unknown Error has Occured, File not Found

July 25, 2008

Everyone who has ever worked with SharePoint eventually gets the well known error window of SharePoint which has something fairly useless such as: An unknown error has occured, please contact your system administrator, or maybe a file not found error without any of the details that allow you to troubleshoot it or understand why the error has occured.

You could go into the SharePoint logs, but almost everyone just turns on debugging, callstack and custom errors off.

Let’s turn SharePoint debugging and error reporting on shall we?

  1. To do this navigate to the Inetpub directory on your SharePoint server.
  2. Navigate into the wwwroot folder.
  3. Navigate into the wss folder.
  4. Navigate into the web application’s folder. (This is either a hostheader name, or a port number, if in doubt talk to whomever set up your SharePoint environment.)
  5. Open the web.config file.
  6. Find the following line: <customerrors mode=”On” /> and change the “On” value to “Off”.
  7. Find the following line: <SafeMode MaxControls=”50″ CallStack=”false” and change the “false” value of CallStack to “true”.
  8. Find the following line: <compilation batch=”false” debug=”false“> and change the “false” value of debug to “true”.
  9. Perform either an IISReset (hit windows + R and type IISRESET and click OK)
    OR
    Just recycle the app pool. (This way it doesn’t impact the other web applications.)

When you reload the page, site, or reperform the error causing action you should now see more information on what caused the error and if you still aren’t sure how to resolve it can always turn to mans best friend google and search for that error.

Good luck with your troubleshooting,
Richard