Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web.config Custom Errors mode Conflict

Tags:

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.

enter image description here

enter image description here

when I set mode to On,say Please set customErrors mode to On Again.

enter image description here

enter image description here

like image 550
Saeed Avatar asked Nov 06 '12 07:11

Saeed


People also ask

How do I disable custom error mode in Web config?

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".

What is use of custom errors tag in Web config file?

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.

What happens when custom errors are on but no default redirect path is specified?

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.


1 Answers

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

like image 106
Ajeesh M Avatar answered Sep 18 '22 10:09

Ajeesh M