移除應用程式中所有註冊的網路請求模組。
<組態>
<system.net>
<webRequestModules>
<清>
語法
<clear/>
屬性和項目
下列章節說明屬性、子元素和父元素。
Attributes
沒有。
子元素
沒有。
父項目
| 元素 | 說明 |
|---|---|
| webRequestModules | 指定用於向網路主機請求資訊的模組。 |
備註
此 clear 元素移除所有先前在組態檔案中或設定階層中更高層定義的註冊 Web 請求模組。
組態檔
此元素可用於應用程式設定檔或機器設定檔(Machine.config)。
Example
以下範例清除所有網頁請求模組,然後註冊一個 HTTP 的網頁請求模組。
<configuration>
<system.net>
<webRequestModules>
<clear/>
<add prefix="http"
type="System.Net.HttpRequestCreator, System, Version=2.0.3600.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>
</webRequestModules>
</system.net>
</configuration>