SharePoint error messages: “Unknown Error”

Well, this may sound very basic post to most people, however, being new to sharepoint i myself was very frustated with the error messages that SharePoint generates because the messages don’t give any indication as to what the actual problem is.

The offending message is the dreaded “Unknown Error” message.

 

We know that SharePoint (actually ASP.NET) knows what the error is; it’s just that the framework is keeping that information to itself.

Follow the following steps to get the details of the message:-

  • open the web.config of the site you’re experiencing the problem in (eg. c:inetpubwwwrootwssvirtualdirectoriesmysitenameweb.config)
  • Do a search for “CallStack” and toggle that element to “true”.
  • do a search for “customErrors” and toggle that element to “off”. Save the web.config file.
  • Save the web.config file.
  • Now, If you go back to your site and refresh the page, you should see the actual exception that was thrown and where it was thrown.
  • Lastly, if you did this change in production, you’ll want to change it back, but that probably goes without saying 😉