Blog Objective

This is a blog that attempts to make life easier by noting down the author's accrued knowledge and experiences.
The author has dealt with several IT projects (in Java EE and .NET) and is a specialist in system development.

29 April 2011

SharePoint: "An unexpected error has occurred"

Debugging SharePoint is ridiculously difficult as the error in the title shows.
To have any meaningful errors displayed, you need to enable the error display.

To do so requires you to change the web.config of the site. Namely:
  • Safe Mode
  • Custom Errors
Change Safe Mode to display call stack:
<SafeMode MaxControls="200" CallStack="true" ...
Change Custom Error to off:
<customErrors mode="off"...
After which, you will be able to see the standard ASP.NET error page that you're already accustomed to.

More advanced troubleshooting tips can be found here: http://blog.thekid.me.uk/archive/2007/07/25/debugging-tips-for-sharepoint-and-wss-exceptions.aspx

No comments: