CustomErrors mode="Off"

Solution 1:

This has been driving me insane for the past few days and couldn't get around it but have finally figured it out:

In my machine.config file I had an entry under <system.web>:

<deployment retail="true" />

This seems to override any other customError settings that you have specified in a web.config file, so setting the above entry to:

<deployment retail="false" />

now means that I can once again see the detailed error messages that I need to.

The machine.config is located at

32-bit

%windir%\Microsoft.NET\Framework\[version]\config\machine.config

64-bit

%windir%\Microsoft.NET\Framework64\[version]\config\machine.config 

Hope that helps someone out there and saves a few hours of hair-pulling.

Solution 2:

"Off" is case-sensitive.

Check if the "O" is in uppercase in your web.config file, I've suffered that a few times (as simple as it sounds)

Solution 3:

In the interests of adding more situations to this question (because this is where I looked because I was having the exact same problem), here's my answer:

In my case, I cut/pasted the text from the generic error saying in effect if you want to see what's wrong, put

<system.web>
   <customErrors mode="Off"/>
</system.web>

So this should have fixed it, but of course not! My problem was that there was a <system.web> node several lines above (before a compilation and authentication node), and a closing tag </system.web> a few lines below that. Once I corrected this, OK, problem solved. What I should have done is copy/pasted only this line:

<customErrors mode="Off"/>

This is from the annals of Stupid Things I Keep Doing Over and Over Again, in the chapter entitled "Copy and Paste Your Way to Destruction".