Wednesday, January 23, 2013

SharePoint 2013: Disabling custom errors does not work

I know how to enable custom errors in ASP.NET in the very begining of my .NET career and it did apply to SharePoint until now (I thought).

Whenever I need to see custom errors (detailed exception information) we would do two things

  1. Set <customErrors mode="Off" /> within section
  2. Within section create or update the following CallStack="true"
I was just trying to configure FBA using a custom sign in page (ApplicationPage) and could not see detailed error information, so as usual I did the above two things and expected a detailed log would appear. But did n't. I am not sure if this is  required this in SharePoint 2010. So not sure about 2010. This thing happens to be in SharePoint 2013.

But, it seems we need to do this in one more place actually. It is in the layouts folder on the machine where SharePoint is installed. This could be because layouts folder has its own web.config to override any changes to the web.config in the root folder of the web application. Coincidentally, I was expecting to see trace info within my application page (custom sign in page). So once I changed the settings in web.config in layout folder, I got to see what I needed. :)


  1. Experienced the same issue myself. Very frustrating that this needs to be set within the global config file.

    Not yet tested to see whether this config file overrides individual config files for other apps. That would truly suck.

  2. I am totally with you Paul. It took a while for me to figure it out.

  3. Which file is it, there are more than one web.config files in _layouts...

  4. Which folder are you looking at? It should be the folder in which you are accessing application page. This is the folder from which web.config overrides the default behavior of the whole web application when the page is loaded from this folder.