Training
Module
Troubleshoot routing, traffic control and load balancing in Microsoft Azure - Training
Troubleshoot network issues revolving around routing and traffic control and load- balancing.AZ720 AZ-720 az-720 networking
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to: Internet Information Services on Windows Server 2016 and later operating system versions
Failed Request Tracing is a powerful tool for troubleshooting request-processing failures in the Internet Information Services (IIS) web server that ships with Windows Server 2016 or later versions. This article provides steps to enable Failed Request Tracing rules to debug failures and trace steps in Application Request Routing. For more information about Failed Request Tracing rules, see Troubleshoot failed requests using tracing in IIS.
To configure Failed Request Tracing rules and to understand what to look for when troubleshooting Application Request Routing.
This walkthrough requires the following prerequisites:
If Application Request Routing hasn't been installed, download it from the Download Center, and install it by following the steps outlined in Install Application Request Routing.
Another prerequisite is that you have gone through Using the Application Request Routing Module and have configured Application Request Routing. Application Request Routing should be in working order before proceeding with the following sections.
Configure the Failed Request Tracing rules for Application Request Routing using the UI or using the command-line.
Launch Internet Information Services (IIS) Manager (inetmgr).
Select Default Web Site.
In the Actions pane, under Configure, select Failed Request Tracing….
In the Edit Web Site Failed Request Tracing Settings dialog box, select the Enable checkbox.
Select OK to save changes.
Select Default Web Site.
Double-click Failed Request Tracing Rules.
In the Actions pane, select Add….
Select All content (*), and then select Next.
Select Status code(s): and enter 200-399.
Select Next. The above configuration has created a Failed Request Tracing rule that writes traces when the status code falls between 200 and 399.
Deselect ASP,ASPNET, and ISAPI Extension. After selecting WWW Server, deselect everything under Areas:, except for Rewrite and RequestRouting. Because Application Request Routing relies on the URL Rewrite Module to inspect incoming requests, it's recommended that you enable the traces for both Application Request Routing (RequestRouting) and URL Rewrite Module (Rewrite).
For additional information about URL Rewrite Module traces, see Using Failed Request Tracing to Trace Rewrite Rules.
Select Finish.
Open a command prompt with administrator privileges.
Navigate to %windir%\system32\inetsrv
.
To enable Failed Request Tracing on the Default Web Site, run the following command:
appcmd set site "Default Web Site" -traceFailedRequestsLogging.enabled:"true" /commit:apphost
To configure the Failed Request Tracing Rules as shown in the UI above, run the following commands:
appcmd.exe set config "Default Web Site" -section:system.webServer/tracing/traceFailedRequests /+"[path='*']"
appcmd.exe set config "Default Web Site" -section:system.webServer/tracing/traceFailedRequests /+"[path='*'].traceAreas.[provider='WWW Server',areas='Rewrite,RequestRouting',verbosity='Verbose']"
appcmd.exe set config "Default Web Site" -section:system.webServer/tracing/traceFailedRequests /[path='*'].failureDefinitions.statusCodes:"200-399"
In this step, you'll send requests to Application Request Routing and analyze Failed Request Tracing logs.
Navigate to the directory where the Failed Request Tracing logs are written. By default, the location is %SystemDrive%\inetpub\Logs\FailedReqLogFiles\
.
Change the directory to the folder that matches the Default Web Site. By default, it's W3SVC1. If you're unsure, select the Default Web Site in IIS Manager, and then select Advanced Settings… in the Actions pane. The value of the ID indicates the corresponding folder. (For example, ID 1 corresponds to W3SVC1).
If there are any XML files, remove them by typing:
del *.xml
Send a request to Application Request Routing. If Application Request Routing is functioning correctly, it results in a 200 response, which falls within the 200 to 399 range that is specified in Step 1. Therefore, the logs are written to the location above.
List the files in the directory to confirm that new XML files are written.
Open the XML file. Select Request Details. Select Complete Request Trace, and then Select Expand All. The following image is an example of a Failed Request Tracing log for Application Request Routing:
Pay closer attention to the following sections:
GENERAL_REQUEST_HEADERS:
ARR_REQUEST_ROUTED:
ARR_SERVER_STATS:
GENERAL_RESPONSE_HEADERS
GENERAL_RESPONSE_ENTITY_BUFFER
The following have been added with the timestamps to indicate the start and end times of corresponding events to profile the performance of Application Request Routing:
If you're collecting the Failed Request Tracing logs on server core, copy the logs with freb.xsl stylesheet to a computer where a browser is available.
You have now successfully configured Failed Request Tracing rules for Application Request Routing. Failed Request Tracing rules can be used to troubleshoot and debug Application Request Routing, as well as understand the routing decisions, including load balance algorithms, that it has made in selecting the destination server for a given request.
Training
Module
Troubleshoot routing, traffic control and load balancing in Microsoft Azure - Training
Troubleshoot network issues revolving around routing and traffic control and load- balancing.AZ720 AZ-720 az-720 networking