SharePoint 2010 Custom Errors

1 minute read

About a year ago I wrote a article on deactivating the custom errors off SharePoint 2007. That had to be done in the following manner:

Step 1:

Change

<SafeMode MaxControls="200" CallStack="false" >

to

<SafeMode MaxControls="200" CallStack="true" >

Step 2:

<customerrors mode="Off" />

If you do this on a SharePoint 2010 installation you will still get the following error:

 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 tag within a "web.config" configuration file located in the root directory of the current web application. This 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".

This errors states that you did not make the change. This is because there is another web.config file that is being loaded. This file can be found in the following location:

 C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config

If you change this file you will be able to see the .net errors. If you would like to see custom errors on Central Administration you will also have to change the web.config file in the admin folder off the 14 hive:

 C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\ADMIN\web.config

Happy Coding.