Use Failed Request Tracing Rules to Troubleshoot ARR

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

This topic describes how to configure and use failed request tracing rules to troubleshoot and debug Application Request Routing (ARR). You can also use failed request tracing rules to understand how routing decisions are made when selecting a destination server for a specific request. For more information about failed request tracing rules, see Troubleshooting Failed Requests Using Tracing in IIS 7.

To configure and use failed request tracing rules, you must have IIS 7 installed on a computer that is running Windows Server® 2008 or a more recent operating system; the Tracing role service must be installed for IIS 7, ARR and its dependent modules, and you must have a minimum of two application servers that have working sites and applications.

To configure and use failed request tracing rules, you must follow these steps:

  1. Configure failed request tracing rules.

  2. Analyze failed request tracing logs.

Configure Failed Request Tracing Rules

You can configure failed request tracing rules by using the UI or by using the command line.

To configure failed request tracing rules by using the UI

  1. Open IIS Manager.

  2. In the Connections pane, expand the server node, and then expand the Sites node.

  3. Under the Sites node, select the Default Web Site or any site on which you want to configure failed request tracing rules.

  4. In the Actions pane, click Failed Request Tracing….

  5. In the Edit Web Site Failed Request Tracing Settings dialog box, select the Enable check box. Click OK.

  6. In the Connections pane, select the Default Web Site.

  7. In the Default Web Site pane, double-click Failed Request Tracing Rules.

  8. In the Actions pane, click Add….

  9. In the Add Failed Request Tracing Rule dialog box, on the Specify Content to Trace page, select the type of content that you want to trace:

    • All content (*)

    • ASP.NET (*.aspx)

    • ASP (*.asp)

    • Custom

  10. Click Next.

  11. On the Define Trace Conditions page, select the condition that you want to use to trace requests and enter an appropriate value:

    • Status code(s)

    • Time taken (in seconds)

    • Event severity

  12. Click Next.

  13. On the Select Trace Providers page, in the Providers list, clear the following check boxes: ASP, ASPNET, and ISAPI Extension.

  14. In the Providers list, select WWW Server.

  15. In the Areas list, select the following check boxes: Rewrite and RequestRouting. Make sure that the remaining check boxes are cleared, and then click Finish.

To configure failed request tracing rules by using the command line

  1. Open a command prompt with administrator user rights, and navigate to %windir%\system32\inetsrv.

  2. To enable failed request tracing on the Default Web Site, enter the following command:

    appcmd set site “Default Web Site” –traceFailedRequestsLogging.enabled:”true” /commit:apphost

  3. To configure the failed request tracing rules that you configured by using the UI procedure, enter the following commands:

    appcmd.exe set config “Default Web Site” –section:system.webServer/tracing/traceFailedRequests /+”[path=’*’]”

    where * is the type of content that you want to trace.

    appcmd.exe set config “Default Web Site” –section:system.webServer/tracing/traceFailedRequests /[path=’*’].failureDefinitions.traceCondition:”value”

    where * is the type of content that you want to trace, traceCondition is the trace condition that you want to use to trace requests, and value is the appropriate value for that trace condition.

    appcmd.exe set config “Default Web Site” –section:system.webServer/tracing/traceFailedRequests /+”[path=’*’].traceAreas.[provider=’provider’,areas=’area’,verbosity=’Verbose’]”

    where * is the type of content that you want to trace, provider is the type(s) of provider that you want to use, and area is the area(s) that you want to focus.

Analyze Failed Request Tracing Logs

By default, failed request tracing logs are located in the %SystemDrive%\inetpub\Logs\FailedReqLogFiles\ directory. You can view the following detailed information in the tracing log files in this directory:

GENERAL_REQUEST_HEADERS

Headers shows the HTTP header that ARR has received.

ARR_REQUEST_ROUTED

WebFarm indicates the name of the server group to where the request is routed.

Server indicates the destination server to where the request is routed.

Algorithm indicates which load balance algorithm is used.

RoutingReason explains the decision behind why the server is selected.

ARR_SERVER_STATS

State is the availability of the destination server.

TotalRequests is the runtime statistic that shows how many requests have been sent to the server.

CurrentRequests is the runtime statistic that shows the concurrent number of HTTP requests to the server.

BytesSent is the runtime statistic that shows how much data (in KB) has been sent to the server.

BytesReceived is the runtime statistic that shows how much data (in KB) has been received from the server.

ResponseTime is the runtime statistic that shows the response time (in ms) of the server.

GENERAL_RESPONSE_HEADERS

Headers shows the response HTTP header from the destination server.

GENERAL_RESPONSE_ENTITY_BUFFER

Buffer shows the response entity from the destination server.

ARR_REQUEST_HEADERS_START, ARR_REQUEST_HEADERS_END, ARR_RESPONSE_HEADERS_START, ARR_RESPONSE_HEADERS_END, ARR_REQUEST_ENTITY_START, ARR_REQUEST_ENTITY_END, ARR_RESPONSE_ENTITY_START, ARR_RESPONSE_ENTITY_END

To profile the performance of ARR, these sections include timestamps to indicate the start and end times of corresponding events.

See Also

Concepts

Disk Caching Tasks
ARR Common Tasks