Details: To enable the details of this specific error message to be viewable on remote machines, 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 "Off".
CustomErrors supports the following modes: On – If defaultRedirect is specified, they will see that content. Otherwise, the default error screen with fewer details. Off – Detailed error details will be shown to the user. (the “yellow screen of death screen”)
Choose the ASP.NET tab. Click on "Edit Configuration". Click the Custom Errors tab. Select Off for custom error mode.
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.
"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)
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".
For Sharepoint 2010 applications, you should also edit C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config
and define <customErrors mode="Off" />
I tried most of the stuff described here. I was using VWD and the default web.config file contained:
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
I changed mode="RemoteOnly" to mode="Off". Still no joy. I then used IIS manager, properties, ASP.Net Tab, Edit configuration, then chose the CustomeErrors tab. This still showed RemoteOnly. I changed this to Off and finally I could see the detailed error messages.
When I inspected the web.config I saw that there were two CustomErrors nodes in the system.web; and I have just noticed that the second entry (the one I was changing was inside a comment). So try not to use notepad to inspect web.config on a remote server.
However, if you use the IIS edit configuration stuff it will complain about errors in the web.config. Then you can rule out all of the answers that say "is there an XML syntax error in your web.config"
The one answer that actually worked to fix this I found here: https://stackoverflow.com/a/18938991/550975
Just add this to your web.config
:
<configuration>
<system.webServer>
<httpErrors existingResponse="PassThrough"/>
</system.webServer>
<configuration>
You can generally find more information regarding the error in the Event Viewer, if you have access to it. Your provider may also have prevented custom errors from being displayed at all, by either overriding it in their machine.config, or setting the retail attribute to true (http://msdn.microsoft.com/en-us/library/ms228298(VS.80).aspx).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With