SharePoint Error – An unexpected error has occurred

While I was modifying SharePoint’s master page to put an inline code, I was constantly redirected to SharePoint Error Page “An unexpected error has occurred”.

After spending nearly an hour to get a clue from EventLog and other sources, I found out that by adding the following config codes to web.config of the web application where the site collection resides, we can see the ASP.NET error page with detailed information.

<SafeMode MaxControls=”200″ CallStack=”true”>
<customErrors mode=”Off”/>

Comments

  1. Unexpected error might be anything, You need to see what is the root cause of the Error,

    Open the Web.Config file of the IIS SharePoint WebSite
    Search for the CallStack and change it to CallStack=”true”
    Search for the CustomError and change it to CustomError=”Off”
    Browse the page you will get to know the actual issue that causes the error

    You yourself can rectify it , it might be as simple as missing dll

     

    Thanks

Leave a Reply

Your email address will not be published / Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.