Monday, May 16, 2011

How to resolved “An unexpected error has occurred” error message in SharePoint

When you are developing with WSS/MOSS then unllimited unexpected errors are displayed simply like this error message “An unexpected error has occurred” but you can't predict one particular cause of this error because there is many reasons behind this error occurence like:

  • some of them you can debug in the sharepoint log files.
  • some of them you can find details in the event log.
  • some… you find nothing.

From this error message you can not find exact cause because an unexpected error can occurs due to multiple resons so to recover this error, first you have to find exact cause behind this error. 

You should do something for getting the full error message. Here is some simple steps to get full error message:

1)  Go to the MOSS site for which you would like to enable it. Go to c:inetpubwwwrootwssVirtualDirectories and a sub directory with your web application’s port number.

2)   Locate and open the web.config file for editing.

3)   Find out the below entry
<SafeMode MaxControls=“200“ CallStack=“false“ DirectFileDependencies=“10“ TotalFileDependencies=“50“ AllowPageLevelTrace=“false“>
And replace it from below entry:
<SafeMode MaxControls=“200“ CallStack=“true“ DirectFileDependencies=“10“ TotalFileDependencies=“50“ AllowPageLevelTrace=“true“>
4)  <customErrors mode=“On“ /> To <customErrors mode=“Off“ />

5)   Save and close web.config.

From the help of above steps you found the exact cause of the error so you can easily recover this error. If above method does not work then you should use third party recovery tools.

1 comment:

  1. Thanks for sharing such valuable information.Keep posting such great info for us thanks.