IIS7 Complete introduction of failure request tracking Configuration _win Server

Source: Internet
Author: User
Tags time interval
Failure request tracking can be configured at two levels:

-At the site level, you can enable or disable tracing and configure log file settings.

-At the application level, you can specify failure conditions when capturing trace events, and you can also configure trace events that should be captured in log file entries.

  (i) View a list of failed request tracking rules

To manage the tracking rules for a failed request, you can view a list of all the failed request tracking rules for a specific configuration level. The list can be sorted by path, associated trace provider, HTTP status code, time or range (local or inherited) in which the request is processed. In addition, you can group rules by scope to quickly see which rules apply to the current configuration level and which rules are inherited from the parent.

1. Open IIS Manager, and then navigate to the level you want to manage.

2. In the feature view, double-click failed request tracking rules.

Alternatively, you can implement it by command-line, to see a list of failed request tracking rules, use the following syntax:

Appcmd Configure Trace "string"

The variable string is the name of the site for which you want to view a list of failed request tracking rules.

  (ii) Enable trace logging for failed requests

If you want IIS to log information about requests that failed to provide site or application content, you can enable trace logging for failed requests. After you enable trace logging for a failed request, IIS provides a targeted log, eliminating the need to find a failed request from a list full of unrelated log entries. In addition, you can resolve them without reproducing the error.

You can configure the following:

-Location of log files

-Maximum number of log files to keep

-The maximum size of the log file.

1. Open IIS Manager, and then navigate to the level you want to manage.

2. In the Connections pane, click Web Site.

3. In the feature view, select the site for which you want to enable trace logging.

4. In the actions pane, under Configuration, click Failed Request tracking.

5. In the edit Web site failed Request Tracking Settings dialog box, select Enable to enable logging for the site.

6. In the Table of Contents text box, type the path you want to use to store the log files, or click the browse button (...) to find the location you want on your computer. The default path is%systemdrive%\inetpub\logs\failedreqlogfiles.

Note:

It is a best practice to store log files, such as log files for failed request tracking, in a directory other than systemroot.

7. In the maximum number of trace files text box, type the maximum number of trace log files that you want to keep, and then click OK.

(iii) Disabling failed request trace logging

When you no longer need to track failed requests to applications on a site or site, you can disable site-level trace logging for failed requests. After you disable trace logging for a failed request, IIS no longer creates a trace log to record any requests for that site that are defined as failures according to the failure definition.

1. Open IIS Manager, and then navigate to the level you want to manage.

2. In the Connections pane, click Web Site.

3. In the feature view, click the site for which you want to disable trace logging.

4. In the actions pane, under Configuration, click Failed Request tracking.

5. In the edit Web site failed Request Tracking Settings dialog box, clear Enable, and then click OK.

 (iv) Create a tracking rule for a failure request

If a request sent to the server fails or takes too long, you can define a failed request tracking rule that captures the tracing events for this request and logs them when they occur, without having to reproduce the corresponding error. The event is written to the trace log only if the request exceeds the time interval allocated to complete processing, or when the specified HTTP status and child status code combination is generated for the response. The trace log contains only information that is specific to the failed request. You can find the information you need about a particular failure request without having to review the large log file that contains each request.

Note: You must enable trace logging before you can create a trace log for a failed request. For more information about how to enable trace logging, see IIS 7.0: Enable trace logging for a failed request.

Note: When you add a configuration setting, the setting is added at the local level and all child levels that inherit the setting.

1. Open IIS Manager, and then navigate to the level you want to manage.

2. In the feature view, double-click failed request tracking rules.

3. On the failure Request Tracking Rules page, click Add in the Actions pane.

4. In the Add failed Request Tracking Rule dialog box, in the Specify what to track area, select:

-All content (*)-when you want to track all files in the directory.

-ASP.net (*.aspx)-when you want to track all the. aspx files in the directory.

-ASP (*.asp)-when you want to track all. asp files in the directory.

-Custom-when you want to define a failure for a custom content set (such as "Xyz.exe" or "*.jpg"). It can contain at most one wildcard character and must be in the directory where the failed request definition is set?.

5. Click "Next".

6. In the Define tracking criteria area of the Add failed Request Tracking Rule dialog box, select one or more of the following criteria to follow:

-Status code-enter the status code to be tracked. You can enter multiple status codes separated by commas in the list. You can also use the child Status code to subdivide the status code, such as "404.2, 500".

-Time spent-enter the maximum amount of time (in seconds) that the request should take.

-Event Severity-Select the severity level to track from the event severity Drop-down list. You can select error, critical error, or warning.

Note: If all conditions are specified, the first condition that satisfies will generate the failed request trace log file.

7. Click "Next".

8. In the Add failed Request Tracking Rule dialog box, under Providers in the Select Trace provider area, select one or more of the following providers:

-ASP-When you want to track the start and completion of an ASP request's execution operation.

-ASPNET-When you want to see the request go into and out of managed code. This includes *.aspx requests.

-ISAPI extension-when you want to track requests being transferred to and from the ISAPI extension process.

-WWW server-when you want to track requests through the IIS worker process.

9. In the Select Trace provider area of the Add failed Request Tracking Rule dialog box, under Verbosity, select one or more of the following levels of detail:

-General-Provides information about the requested activity context, such as the General_request_start event that logs the requested URL and predicate to the log.

-Critical error-Provides information about actions that can cause a process to exit or are about to cause a process to exit.

-Error-Provides information about the component that encountered the error and cannot continue processing the request. These errors usually indicate server-side problems.

-Warning-Provides information about the component that encountered the error but can continue to process the request.

-Information-Provides general information about the request.

-Detailed-Provides detailed information about the request. This is the default selection.

10. If you selected the "ASPNET" Trace provider in step 8th, under Zones in the Select Trace provider area of the Add failed Request Tracking Rule dialog box, select one or more of the following functional areas to be tracked by this provider:

-Structure-when you want to track events that are primarily related to entering and leaving various parts of the ASP.NET structure.

-Modules-when you want to track events that are logged when you request to enter and leave individual HTTP piping modules.

-page-when you want to generate a trace event that corresponds to the execution of a specific ASP.net page-related event (for example, Page_Load, etc.).

-AppServices-When you want to track events that are part of the new application's service functionality.

11. If you selected the WWW server trace provider in step 8th, under Zones in the Select Trace provider area of the Add failed Request Tracking Rule dialog box, select one or more of the following functional areas to be tracked by this provider:

-Authentication-when you want to track authentication attempts, such as tracking authenticated user names, authentication schemes (anonymous, basic, and so on), and the results of authentication attempts (successes, failures, errors, and so on).

-Security-when you want to generate a trace event when the IIS server rejects a request for security-related reasons, such as denying clients access to a resource.

-Filters-When you want to determine the time that the ISAPI filter takes to process a request.

-Staticfile-When you want to track the time it takes to complete a static file request.

-CGI-when you want to generate a trace event with a request for a CGI file.

-Compression-when you want to generate a trace event in response to a compressed response.

-Cache-When you want to generate a trace event for the cache operation associated with the request.

-Requestnotifications-When all request notifications are captured when entering and exiting.

-Modules-when you want to track events that log when you request to enter and leave individual HTTP piping modules, or when you want to capture the trace events for a managed module.

12. Click Finish.

 (v) Edit failed request tracking rules

When you want to change the failure definition of a rule, you can change the failed request tracking settings. You can also change these settings when you want to collect additional information about failed requests, for example, when you want to change the length of the response time that waits before the request is treated as a failed request.

1. Open IIS Manager, and then navigate to the level you want to manage.

2. In the feature view, double-click failed request tracking rules.

3. On the failure Request Tracking Rules page, click the rule that you want to change, and then click Edit in the Actions pane.

4. In the Specify what to Track dialog box, click Next.

5. You can also perform one or more of the following actions in the Define Tracking criteria dialog box:

-Change the status code in the Status Code text box to track the failure of the changed status code.

-Change the elapsed time (in seconds) and type the time interval in the time used (in seconds) text box.

-Change the event severity by selecting a new severity from the event severity Drop-down list, and then click Next.

6. You can also do one or more of the following actions in the Select Trace Provider dialog box to change the provider:

-If you want to configure IIS to track ASP requests, click ASP.

-If you want to configure IIS to track asp.net requests, click ASPNET.

-If you want to configure IIS to track WWW server requests, click WWW Server.

-If you want to configure IIS to track ISAPI requests, click ISAPI Extensions.

7. You can also click a provider to change its verbosity level.

8. Under Provider properties, in the level of detail Drop-down list, click a level of detail.

9. Repeat steps 7th and 8th for each provider that you select in the Select Trace Provider dialog box and want to change its verbosity level.

10. You can also click a provider to change the area that you want to track.

11. Under area, select the zone that you want this provider to track.

12. Repeat steps 10th and 11th for each provider that is selected in the Select Trace Provider dialog box and wants to change the area of its tracking.

13. Click Finish.

Note: You must specify at least one trace provider to enable the Finish button.

(vi) Deletion of failed request tracking rules

If you no longer need to track a particular request failure, you can delete the trace rule for the failed request. You can delete a local level failure request tracking rule, or you can delete a failed request tracking rule that inherits from the parent level.

1. Open IIS Manager, and then navigate to the level you want to manage.

2. In the feature view, double-click failed request tracking rules.

3. On the failure Request Tracking Rules page, click the trace rule that you want to delete to select it.

4. In the actions pane, click Delete, and then click Yes.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.