When developing SharePoint components we often times get an error screen with this message:
Server Error in ‘/’ Application.——————————————————————————–Runtime ErrorDescription: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a “web.config” configuration file located in the root directory of the current web application. This <customErrors> tag should then have its “mode” attribute set to “RemoteOnly”. To enable the details to be viewable on remote machines, please set “mode” to “Off”.Server Error in ‘/’ Application.——————————————————————————–
Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.
Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a “web.config” configuration file located in the root directory of the current web application. This <customErrors> tag should then have its “mode” attribute set to “RemoteOnly”. To enable the details to be viewable on remote machines, please set “mode” to “Off”.
In SharePoint 2007 we would go into IIS, find our virtual directory and change the CallStack from false to true and the customErrors mode from On to Off. (reference)
However, that doesn’t seem to work for SharePoint 2010. I made those changes and I still got that annoying generic error message. As it turns out, SharePoint 2010 has a second web.config file located:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config
That second web.config file contains the customErrors section that needs to be set to Off.
Central Administration has a second web.config file too if you need to see error descriptions their:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\ADMIN\web.config
This was very frustrating for me to find, so hopefully this helps someone else.