Azure App Service - Configure Failed Request Tracing

In my previous articles listed below, we learned how to create Azure app Service Web app.

  1. Azure App Service: Create Web App from Visual Studio
  2. Azure App Service - Configure Existing Application From Visual Studio
  3. Azure app Service – Configure Detailed Error Logging

Prerequisites

  1. Azure account.
  2. FileZilla.

Azure allows us to enable the Web Server diagnostic services for debugging and troubleshooting for all the app Services. Below are the different types of services, that Azure app Service provides us.

  1. Detailed Error Logs: These error logs provide us the information about all the HTTP errors, which are generated.
  2. Failed Request Tracing: These logs helps us to understand the reasons for all the failed requests.
  3. Web Server Logging: These logs provide information about all the events that occur on the Server like the number of requests, IP address of the user, who made the requests etc.

Let’s see how to enable Failed Request Tracking for Azure app Service in this article.

Login to the Azure Management portal and navigate to the settings of the App Service Web App for which you would like to enable the Failed Request Tracing as shown below.

Now, click “Diagnostic Logs”, as shown below:

Diagnostic Logs

You will be taken to the “Logs” blade, as shown in the screenshot, given below: 

Logs

By default, the “Failed request tracing” is disabled. Let’s enable it, by clicking “On” toggle button", as shown below:

Failed request tracing
Click “Save” button to save the changes, as shown above.

Now, try to create an error. I browsed to the Web app without a valid favicon (which is a kind of error for the sake of explanation). As soon as there is an error, it creates a new folder named “W3SVC#########” in the “Log Files” folder, as shown below:

W3SVC

Let’s open the W3SVC folder, as shown below:

folder

It creates an .XML file for each error and the “W3SVC” folder also contains a .XSL file named “fred.xsd”. Below is a glimpse of the .XML file.

xml

As shown in the above screenshot, it provides detailed information about the source of the request. You can go through the complete information of the error and can fix the problem.

Up Next
    Ebook Download
    View all
    Learn
    View all