Why can't I see the detailed error message on this aspx page?

I have an aspx page and a user error is displayed, but I do not see a detailed error message. My web.config looks like this:

<?xml version="1.0"?> <configuration> <appSettings /> <connectionStrings /> <system.web> <compilation debug="true" /> <authentication mode="Windows" /> <customErrors mode="On" /> </system.web> </configuration> 
+6
runtime-error custom-errors
source share
1 answer

To see this error, you need customErrors off , for example:

 <customErrors mode="Off"></customErrors> 

The documents specify the parameters for the mode attribute:

  • On . Indicates that user errors are enabled. If the defaultRedirect attribute is not specified, users see a general error. User errors are displayed to remote clients and the local host.
  • Off . Indicates that user errors are disabled. Detailed ASP.NET errors are displayed to remote clients and the local host.
  • RemoteOnly . Indicates that user errors are displayed only to remote clients and that ASP.NET errors are displayed to the local host. This is the default value.

Attention!

Setting Off on a real production site is very risky , as some error messages may compromise sensitive data on your site (for example, code and paths, possibly even passwords).

+13
source share

All Articles