TraceUrl Class [IIS 7 and higher]

Configures the failed-request tracing for a specific request path.

Syntax

class TraceUrl : CollectionElement

Methods

This class contains no methods.

Properties

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

Name

Description

CustomActionExe

A read/write string value that specifies an executable file to run when a failure condition is reached (for example, to run a VBScript file, specify "cscript.exe"). All command-line variables will be expanded. For example, "%windir%" will be expanded to the path of the Windows directory.

NoteNote:
The executable file will run only if the limit specified in the CustomActionTriggerLimit property has not been reached in the worker process.

CustomActionParams

A read/write string value that contains parameters to pass to the executable file specified in the CustomActionExe property. Command-line variables such as "%windir%" will be expanded. You may also use parameter variables such as "%1" and "%2" in the string that you specify (for example, "MyScript.vbs %1 %2").

CustomActionTriggerLimit

A read/write uint32 value that specifies the maximum number of times the program specified by the CustomActionExe property will execute during the lifetime of the worker process for the failed-request definition. This value resets every time that the worker process recycles. Permissible values are from 0 through 10000. The default is 1. This feature can be used, for example, to create a memory dump after the next failure but not after subsequent failures.

NoteNote:
If the CustomActionTriggerLimit value that you specify is reached during the run time of the worker process, subsequent failed requests will be logged, but the program specified in CustomActionExe will not run. The entries in the failed-requests log will indicate that the CustomActionTriggerLimit value has been reached.

FailureDefinitions

A read/write FailureDefinition object that specifies the conditions under which a request trace is generated.

Path

A required unique read/write string value that contains the path of the request to be traced (for example, "*.aspx"). This path is relative to the virtual directory, does not allow subpaths, and can contain only one wildcard (*). The Path property is similar to the path attribute in the <handlers> section of the ApplicationHost.config file. The key property.

TraceAreas

A TraceUrlAreaSettings value that specifies areas whose requests are traced.

Subclasses

This class contains no subclasses.

Remarks

Instances of this class are contained in the TraceFailedRequests array property of the TraceFailedRequestsSection class.

Inheritance Hierarchy

CollectionElement

   TraceUrl

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

CollectionElement Class [IIS 7 and higher]

FailureDefinition Class [IIS 7 and higher]

HttpTracingSection Class [IIS 7 and higher]

TraceAreaDefinition Class [IIS 7 and higher]

TraceAreaSettings Class [IIS 7 and higher]

TraceFailedRequestsSection Class [IIS 7 and higher]

TraceProviderDefinition Class [IIS 7 and higher]

TraceProviderDefinitionsSection Class [IIS 7 and higher]

TraceUrlAreaSettings Class [IIS 7 and higher]

Other Resources

Create a Tracing Rule for Failed Requests