fatCop fatCop - 4 years ago 137
Apache Configuration Question

How to disable custom error page generation in IIS server


Spring Boot
application running on
IIS Server
generating custom error page for remote request finding error code
at header. I want to disable it. There should be no custom error page in response data. Desired behavior is there as default in
Apache server
. Though
IIS Server
can be configured to prevent generating custom error page for remote request, I want it to be configured from my application (Web Configuration point may be). Is it possible in

Answer Source

Add a web.config file to your app's webapp directory (app/src/main/webapp). web.config file should consist:

      <httpErrors errorMode="Detailed" existingResponse="Auto" />

this will cause IIS web server to set error mode to 'Detailed' which will prevent generating custom error page.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download