表示 HTTP 追蹤組態區段。
Syntax
class HttpTracingSection : ConfigurationSectionWithCollection
方法
下表列出 類別所 HttpTracingSection 公開的方法。
| 名稱 | 描述 |
|---|---|
| 加入 | (繼承自 ConfigurationSectionWithCollection.) |
| 清除 | (繼承自 ConfigurationSectionWithCollection。) |
| Get | (繼承自 ConfigurationSectionWithCollection。) |
| GetAllowDefinition | (繼承自 ConfigurationSection.) |
| GetAllowLocation | (繼承自 ConfigurationSection。) |
| 移除 | (繼承自 ConfigurationSectionWithCollection。) |
| RevertToParent | (繼承自 ConfigurationSection。) |
| SetAllowDefinition | (繼承自 ConfigurationSection。) |
| SetAllowLocation | (繼承自 ConfigurationSection。) |
屬性
下表列出 類別所 HttpTracingSection 公開的屬性。
| 名稱 | 描述 |
|---|---|
TraceUrls |
TraceUrlSettings值,指定特定類型的要求追蹤。 |
Location |
(繼承自 ConfigurationSection .) 金鑰屬性。 |
Path |
(繼承自 ConfigurationSection .) 金鑰屬性。 |
SectionInformation |
(繼承自 ConfigurationSection。) |
子類別
這個類別不包含子類別。
備註
這個類別會對應至 <httpTracing> ApplicationHost.config 中的 區段,並用於 Windows (ETW 的事件追蹤) 要求型追蹤。
範例
下列程式碼範例會顯示 屬性的內容 TraceUrls 。
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject( _
"winmgmts:root\WebAdministration")
' Get the HTTP tracing section.
Set oSection = oWebAdmin.Get( _
"HttpTracingSection.Path=" & _
"'MACHINE/WEBROOT/APPHOST',Location=''")
' Display the class name of the section.
WScript.Echo "[ " & oSection.Path_.Class & " ]"
' Display the path.
WScript.Echo "Path: " & oSection.Path
' Display the trace url values.
For Each strElement In oSection.TraceUrls.TraceUrls
WScript.Echo strElement.Value
Next
繼承階層架構
ConfigurationSectionWithCollection
HttpTracingSection
規格需求
| 類型 | 描述 |
|---|---|
| Client | - Windows Vista 上的 IIS 7.0 - Windows 7 上的 IIS 7.5 - Windows 8 上的 IIS 8.0 - Windows 10上的 IIS 10.0 |
| 伺服器 | - Windows Server 2008 上的 IIS 7.0 - Windows Server 2008 R2 上的 IIS 7.5 - Windows Server 2012 上的 IIS 8.0 - Windows Server 2012 R2 上的 IIS 8.5 - Windows Server 2016上的 IIS 10.0 |
| 產品 | - IIS 7.0、IIS 7.5、IIS 8.0、IIS 8.5、IIS 10.0 |
| MOF 檔案 | WebAdministration.mof |
另請參閱
建立失敗要求的追蹤規則
CollectionElement 類別
ConfigurationSectionWithCollection 類別
FailureDefinition 類別
TraceAreaElement 類別
TraceAreaDefinition 類別
TraceFailedRequestsSection 類別
TraceProviderDefinition 類別
TraceProviderDefinitionsSection 類別
TraceUrl 類別
TraceUrlSettings 類別