< (Network 設定) 的 system.Net > 元素
包含會指定 .NET Framework 如何連接至網路的設定。
組態
system.net>
Syntax
<system.net>
</system.net>
屬性和項目
下列章節說明屬性、子元素和父元素。
屬性
無。
子元素
Element | 說明 |
---|---|
authenticationModules | 指定用來驗證網際網路要求的模組。 |
connectionManagement | 指定網際網路主機的最大連接數目。 |
defaultProxy | 設定超文字傳輸協定 (HTTP) 的 Proxy 伺服器。 |
mailSettings | 設定 Simple Mail Transport Protocol (SMTP) Mail 傳送選項。 |
requestCaching | 控制網路要求的快取機制。 |
設定 | 為和相關子命名空間中 System.Net 的類別設定基本網路選項。 |
webRequestModules | 指定要用來向網際網路主機要求資訊的模組。 |
父項目
Element | 說明 |
---|---|
設定 | 包含所有命名空間的設定。 |
備註
System.net >元素包含和相關子命名空間中 System.Net 之類別的設定。 這些設定會設定驗證模組、連線管理、郵件設定、proxy 伺服器,以及從網際網路主機接收資訊的網際網路要求模組。
範例
下列範例顯示類別所使用 System.Net 的一般設定。
<configuration>
<system.net>
<authenticationModules>
<add type="System.Net.DigestClient" />
<add type="System.Net.NegotiateClient" />
<add type="System.Net.KerberosClient" />
<add type="System.Net.NtlmClient" />
<add type="System.Net.BasicClient" />
</authenticationModules>
<connectionManagement>
<add address="*" maxconnection="2" />
</connectionManagement>
<defaultProxy>
<proxy
usesystemdefault="true"
bypassonlocal="true"
/>
</defaultProxy>
<webRequestModules>
<add prefix="http"
type="System.Net.HttpRequestCreator"
/>
<add prefix="https"
type="System.Net.HttpRequestCreator"
/>
<add prefix="file"
type="System.Net.FileWebRequestCreator"
/>
</webRequestModules>
</system.net>
</configuration>