IIS: Configure IIS to pass through HTTP errors

Configure IIS to let your application handle error messages.

In IIS configuration, it is recommended to change the default that allows IIS to handle errors. If your application is designed to provide custom error messages in response to errors in the range 400 to 499 – such as a resource not found, access to the resource denied, and so on – often the IIS will provide a standard response instead, or in some cases provide a message in a different format to that expected by the client.

In this task you configure the IIS to allow your application to control error processing by letting messages pass through the IIS.

For more information on setting the httpErrors configuration in IIS, refer to the IIS documentation for your installation.

Steps

  1. Open the web.config file in your application root directory for editing. Typically, this directory is created in the GAS installation path at $FGLASDIR\ISAPI.
    The application root directory is created during the Create an application task of the IIS configuration, when the web.config file is generated by the creation wizard.
  2. Inside the <system.webServer> element, add the child element for httpErrors.
    <system.webServer>
      <httpErrors existingResponse="PassThrough"/>
    </system.webServer>
    The value of the existingResponse attribute must be set to "PassThrough".

    Refer to the IIS documentation for your installation for details about the content of the web.config file.