按一下以給予評分及指教

  開啟低頻寬檢視
本頁僅適用於
Microsoft Visual Studio 2008/.NET Framework 3.5

其他版本也適用於下列軟體:
<system.Net> 項目 (網路設定)

更新:2007 年 11 月

包含指定 .NET Framework 如何連接至網路的設定。

<configuration> 項目
  <system.Net> 項目 (網路設定)
<system.net> 
</system.net>

下列小節將說明屬性、子項目和父項目。

屬性

子項目

項目

描述

authenticationModules

指定用於驗證網際網路要求的模組。

connectionManagement

指定連結至網際網路主機的最大數目。

defaultProxy

設定超文字傳輸協定 (HTTP) Proxy 伺服器。

mailSettings

設定 Simple Mail Transport Protocol (SMTP) 郵件傳送選項。

requestCaching

控制網路要求的快取機制。

settings

System.Net 設定基本的網路選項。

<webRequestModules> 項目 (網路設定)

指定向網際網路主機要求資訊所使用的模組。

父項目

項目

描述

configuration

包含所有命名空間的設定。

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>
社群內容   什麼是社群內容?
新增內容 RSS  註解
Processing
© 2009 Microsoft Corporation. 著作權所有,並保留一切權利。 使用規定  |  商標  |  隱私權聲明
Page view tracker