How to Set Web.Config File to Show Full Error Message

How to set web.config file to show full error message

Not sure if it'll work in your scenario, but try adding the following to your web.config under <system.web>:

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

works in my instance.

also see:

CustomErrors mode="Off"

How to set the 'web.config' file to show the full error message (.NET Core 2.1)

web.config

<system.webServer>
<httpErrors errorMode="Detailed" />
<aspNetCore processPath="dotnet">
<environmentVariables>
<environmentVariable name="ASPNETCORE_DETAILEDERRORS" value="true" />
</environmentVariables>
</aspNetCore>
</system.webServer>

Detailed error message with web.config

This works on Fasthosts (UK) shared hosting:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
</configuration>

It tends to give me the detailed errors that we need for Classic ASP development. Remember to turn that off when the site goes live.

How to setup web.config to see the complete error message for ASP.NET MVC3 project

Finally I found the solution.

Yup we need <customErrors mode="off" /> and also we have to restart website under IIS.

Custom Error mode in Web.Config File

Typically there is one of three causes, but we would have to see a web.config to get detail.

  1. You have an improper ASP.NET version selected in IIS so it cannnot get to your settings
  2. You have a malformed item in your web.config so the structure isn't correct
  3. Your custom errors section is commented out.....


Related Topics



Leave a reply



Submit