FailureDefinition Class [IIS 7 and higher]

Specifies the conditions under which a request trace is generated.

Syntax

class FailureDefinition : EmbeddedObject

Methods

This class contains no methods.

Properties

The following table lists the properties exposed by the FailureDefinition class.

Name

Description

StatusCodes

A read/write string value that contains a comma-delimited list, without spaces, of HTTP status codes that cause a request to be traced. If you do not specify substatus codes, all substatus codes for the given status code will be traced. For example, if you specify "404", traces for 404.1, 404.2 and 404.5 will also be returned. Status codes must be from 100 to 999, and substatus codes must be from 1 to 999.

NoteNote:
You can specify a range of status codes (for example, "400-599"). The second number must be greater than or equal to the first number. The range cannot include substatus values.

TimeTaken

A read-only datetime value that specifies the amount of time that a request may spend in processing before it is marked as failed and then traced. The default is 0. A key property.

Verbosity

A read/write sint32 enumeration value that specifies the threshold for trace events. The possible values are listed later in the Remarks section.

Subclasses

This class contains no subclasses.

Remarks

Instances of this class are contained in the FailureDefinitions property of the TraceUrl class.

A request will have its events traced if it lasts beyond the value of the TimeTaken property or if its status code is in the list contained by the StatusCodes property. If both StatusCodes and TimeTaken are specified, the first condition that evaluates to true will cause the request trace to be generated.

The following table lists the possible values for the Verbosity property. The default is 0 (Ignore).

For a request to be marked as failed, the events raised must have a level less than or equal to the value in Verbosity.

Value

Keyword

Description

0

Ignore

Provides no information about the request activity.

1

CriticalError

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

2

Error

Provides information about components that experience an error and cannot continue to process requests. These errors usually indicate a server-side problem. The default.

3

Warning

Provides information about components that experience an error but can continue processing requests.

Inheritance Hierarchy

EmbeddedObject

   FailureDefinition

Requirements

Type

Description

Client

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

See Also

Reference

EmbeddedObject Class [IIS 7 and higher]

TraceAreaElement Class [IIS 7 and higher]

TraceAreaDefinition Class [IIS 7 and higher]

TraceFailedRequestsSection Class [IIS 7 and higher]

TraceProviderDefinition Class [IIS 7 and higher]

TraceProviderDefinitionsSection Class [IIS 7 and higher]

TraceUrl Class [IIS 7 and higher]

Other Resources

Create a Tracing Rule for Failed Requests