Most of us would have encoutered the common error “Unexpected error has occured” many times in Sharepoint 2007 and Sharepoint 2010 which does not give any details about how and why the error occured.
In Sharepoint 2007, we can track the error by modifying 2 parameters in web.config of our web appication.
i.e. by setting CustomErrors=”Off”(within System.web) and CallStack=”True”(within Sharepoint) which are by default set as “On” and “false” respectively.
Path : C:\inetpub\wwwroot\wss\VirtualDirectories\NameofPort at which our web application runs\web.config.
Just these two parameters will make our way a bit easy ahead if we are working in SharePoint 2007.
But in Sharepoint 2010, we need to change one more web.config located at
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config.
Here we have to set CustomErrors=”Off“.
And we are done.Now we will be able to see each and every error detail in sharepoint 2010.