How can I show detailed ASP errors?

Lloyd Cobb
Published: 21 June 2017Last updated: 8 August 2024
Share:

By default, Windows Server hides application errors from your website. You can override this by adding the following inside a 'web.config' file that will cause IIS to output any errors to your browser:

<configuration>
  <system.webServer>
      <httpErrors errorMode="Detailed" />
  </system.webServer>
  <system.web>
      <customErrors mode="Off" />
      <compilation debug="true" />
  </system.web>
</configuration>

Please be aware it's possible the <configuration> Element might already exist, therefore if this is the case just paste the rest of the code inbetween the start and the end of the element.