IIS Troubleshooting (1/2)
In IIS 7 a new feature was introduced that allows tracing of requests  to simplify troubleshooting.
This feature is not installed by default. It can be installed from the Programs and Features section of the Control Panel as shown in Figure 1.
|Figure 1: Enabling the IIS Tracing Feature|
Once the Tracing feature is installed the "Failed Requests Tracing Rules" icon is available in the IIS Manager as shown in Figure 2. Note that any request can be traced and not only failed requests despite what the name suggests.
|Figure 2: Failed Requests Tracing Rules Icon in the IIS Manager|
- From the Advanced Settings dialog for the site.
- From the new shortcut added to the Actions pane.
Both ways are detailed below.
After the Tracing feature is installed the "Advanced Settings" dialog for each site contains an additional field named "Failed Request Tracing" that can be used to configure the tracing. This is shown on Figure 3 below.
|Figure 3: Advanced Settings with Tracing Settings|
In addition to the new field in the "Advanced Settings" dialog a new "Failed Request Tracing" action is available in the Configure section of the Actions pane as shown on Figure 4.
|Figure 4: Enable Failed Request Tracing|
Selecting this action launches the dialog shown on Figure 5.
|Figure 5: Failed Request Tracing Settings|
Now that we have enabled tracing, we can add a tracing rule. We can either create a tracing rule that applies to all sites (only sites with tracing enabled will apply the rule of course) or for a single website. To create a rule that applies to all sites with tracing enabled we click on the "Failed Requests Tracing Rules" icon in the settings for the entire server. For a rule that applies to only one site we select that site and then click on the "Failed Requests Tracing Rules".
Clicking on the icon displays the list of rules. It is initially empty. This is shown in Figure 6.
|Figure 6: List of Tracing Rules|
We select the Add action from the Actions pane. This launches the rule creation wizard which has 3 screens shown in figures 7, 8 and 9.
For our first example we will actually trace a successful request to see what we can expect when a request is executed normally. For this we leave all the wizard's default choices as is except for the status code in the second dialog (Figure 8) which we set to "200" as that is the status code returned by a successful request in general.
|Figure 7: Add Failed Request Tracing Rule Dialog (1)|
|Figure 8: Add Failed Request Tracing Rule Dialog (2)|
|Figure 9: Add Failed Request Tracing Rule Dialog (3)|
After we close the wizard the list of rules now lists our new rule as shown on Figure 10.
|Figure 10: List of Tracing Rules|
Now that we have a tracing rule, let's see what happens when it is matched. This is covered on the next page.
- iis.net: Troubleshooting Failed Requests Using Tracing in IIS 7
- TechNet: Enable Trace Logging for Failed Requests (IIS 7)
- MSDN Blogs: Enable and Activate Failed Request Tracing Rules
blog comments powered by Disqus