FailureDefinition Class
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. Note: 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
FailureDefinition
Requirements
Type | Description |
---|---|
Client | - IIS 7.0 on Windows Vista - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
Server | - IIS 7.0 on Windows Server 2008 - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
MOF file | WebAdministration.mof |
See Also
Create a Tracing Rule for Failed Requests
EmbeddedObject Class
TraceAreaElement Class
TraceAreaDefinition Class
TraceFailedRequestsSection Class
TraceProviderDefinition Class
TraceProviderDefinitionsSection Class
TraceUrl Class