Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Represents a failed-request tracing configuration section.
Syntax
class TraceFailedRequestsSection : ConfigurationSectionWithCollection
Methods
The following table lists the methods exposed by the TraceFailedRequestsSection class.
| Name | Description | 
|---|---|
| (Inherited from ConfigurationSectionWithCollection.) | |
| (Inherited from ConfigurationSectionWithCollection.) | |
| (Inherited from ConfigurationSectionWithCollection.) | |
| (Inherited from ConfigurationSection.) | |
| (Inherited from ConfigurationSection.) | |
| (Inherited from ConfigurationSectionWithCollection.) | |
| (Inherited from ConfigurationSection.) | |
| (Inherited from ConfigurationSection.) | |
| (Inherited from ConfigurationSection.) | 
Properties
The following table lists the properties exposed by the TraceFailedRequestsSection class.
| Name | Description | 
|---|---|
| Location | (Inherited from ConfigurationSection.) A key property. | 
| Path | (Inherited from ConfigurationSection.) A key property. | 
| SectionInformation | (Inherited from ConfigurationSection.) | 
| TraceFailedRequests | A read/write array of TraceUrl values that configure the tracing for specific request types (for example, *.aspx). | 
Subclasses
This class contains no subclasses.
Remarks
This class corresponds to the <traceFailedRequests> section in ApplicationHost.config.
Example
The following example lists the Location, Path, and TraceFailedRequest properties for the default Web site.
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
' Get the default Web site.
Set oSite = oWebAdmin.Get("Site.Name='Default Web Site'")
' Place the TraceFailedRequestsSection object into a variable by
' using the GetSection method on the Site object.
oSite.GetSection "TraceFailedRequestsSection", oTFRSection
' Echo the path and location information.
WScript.Echo "Path: " & oTFRSection.Path
WScript.Echo "Location: " & oTFRSection.Location
WScript.Echo vbCRLF
' Retrieve and display the values for the TraceFailedRequests property.
For Each oTFR In oTFRSection.TraceFailedRequests
    WScript.Echo "Trace URL path: " & oTFR.Path
    WScript.Echo String(16 + Len(oTFR.Path), "=")
    Set oFD = oTFR.FailureDefinitions
    WScript.Echo "Failure Definition Status Codes: " & oFD.StatusCodes
    WScript.Echo "Failure Definition TimeTaken: " & oFD.TimeTaken
    WScript.Echo "Failure Definition Verbosity Level: " & _
            GetVerbosityText(oFD.Verbosity)
    WScript.Echo 
    For Each oTA In oTFR.TraceAreas.TraceAreas
        WScript.Echo "Trace Provider: " & oTA.Provider
        WScript.Echo "Trace Verbosity Level: " & _
            GetVerbosityText(oTA.Verbosity)
        If Not (oTA.Provider = "ASP" Or _
                oTA.Provider = "ISAPI Extension") Then
            WScript.Echo "Trace Areas: " & oTA.Areas
        End If
        WScript.Echo 
    Next
    WScript.Echo
Next
' Provide text for the verbosity enumeration values.
Function GetVerbosityText(sint32Value)
    Select Case sint32Value
        Case 0
            GetVerbosityText="General"
        Case 1
            GetVerbosityText="Critical Error"
        Case 2
            GetVerbosityText="Error"
        Case 3
            GetVerbosityText="Warning"
        Case 4
            GetVerbosityText="Information"
        Case 5
            GetVerbosityText="Verbose"
        Case Else
            GetVerbosityText ="Undefined Verbosity Level"
    End Select
End Function
Inheritance Hierarchy
ConfigurationSectionWithCollection
TraceFailedRequestsSection
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
ConfigurationSectionWithCollection Class [IIS 7 and higher]
HttpTracingSection Class [IIS 7 and higher]
TraceAreaElement Class [IIS 7 and higher]
TraceAreaDefinition Class [IIS 7 and higher]
TraceProviderDefinition Class [IIS 7 and higher]
TraceProviderDefinitionsSection Class [IIS 7 and higher]
TraceUrl Class [IIS 7 and higher]
TraceUrlAreaSettings Class [IIS 7 and higher]