IIS, how to debug HTTP errors

luca 21/04/2017 0

Today I faced a problem during the setup of a new application: if I opened a browser and entered the URL of the application, I got the following error message

iis-01

To be able to identify the root cause of the error, I found a new feature added in the latest versions of Microsoft IIS (Internet Information Services): the failed request tracing. Using this tool you can selectively trace all the processing pipeline of a request to identify which step causes the error reported to the user.

Let’s see how to use it. First, verify that this feature is installed on your server using the Server Manager:

iis-02

Open the IIS Manager tool, select the site which publishes the application and in the Actions pane (on the right) click on Failed Request Tracing…:

iis-03

Enable the feature and note down the path IIS will save the logs into:

iis-04

Now you have to specify which requests will be traced. Click on the icon:

iis-05

then click on Add... in the Actions pane.

Thanks to a wizard you can define the criteria a request must match to be traced. For example in the screenshot below I created a tracing rule for the requests which return error 401.3:

iis-06

If I reloaded the page with my browser, in the path above I could find the trace logs:

iis-07

With a double-click on the frxxxxxx files, a page with all the details of the request was displayed:

iis-08

When I moved to the Request Details tab I was able to identify the folder IIS couldn’t access:

iis-09

When I set the correct permissions on the NTFS filesystem, the application started to work.

 

Leave A Response »

This website uses cookies to ensure you get the best experience on our website maggiori informazioni

Questo sito utilizza i cookie per fonire la migliore esperienza di navigazione possibile. Continuando a utilizzare questo sito senza modificare le impostazioni dei cookie o clicchi su "Accetta" permetti al loro utilizzo.

Chiudi