I have a great and important problem with Web.Config, I need to see the Error of my page and resolve it in asp.net web form and web config, but when Error Occurred, I see another error and I see this Message :
customErrors mode to Off or On Or RemoteOnly,
I set this property Off, but do not show error and say again please set attribute to On your CustomError.
when I set mode to On,say Please set customErrors mode to On Again.
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".
When customErrors is set to On or RemoteOnly, you need to specify the defaultRedirect attribute. This attribute contains the error page to which the user will be redirected. Additionally you can take custom error handling a step further by associating specific errors with specific error pages.
If no defaultRedirect is specified, users see a generic error page e.g. Error. cshtml in ASP.NET MVC application. Off: Specifies that custom errors are disabled. This displays detailed errors.
When you're having issues with configuration, make sure that your settings isn't overridden.
In this case, your server might have a configuration <deployment retail="true" />
that overrides application settings and disables trace output, custom errors, and debug capabilities.
Change the value to "false"
<deployment retail="false" />
MSDN Link
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