System.Net 命名空間
提供一個簡單的程式設計介面,讓現今網路所用的許多通訊協定使用。 Provides a simple programming interface for many of the protocols used on networks today. WebRequest 和 WebResponse 類別可當做外掛式通訊協定的基礎,此網路服務的實作 (Implementation) 讓您可以使用網際網路資源來開發應用程式,而不需考慮個別通訊協定的細節。 The WebRequest and WebResponse classes form the basis of what are called pluggable protocols, an implementation of network services that enables you to develop applications that use Internet resources without worrying about the specific details of the individual protocols. System.Net 命名空間中的類別可用來開發 Windows 市集應用程式或桌面應用程式。 Classes in the System.Net namespace can be used to develop Windows Store apps or desktop apps. 當 System.Net 命名空間的類別在 Windows 市集應用程式中使用時,會受到網路隔離功能的影響,此功能為 Windows 開發人員預覽使用的應用程式安全性模型的一部分。 When used in a Windows Store app, classes in the System.Net namespace are affected by network isolation feature, part of the application security model used by the Windows Developer Preview. 必須在 Windows 市集應用程式的應用程式資訊清單中啟用適當的網路功能,系統才能允許 Windows 市集應用程式進行網路存取。 The appropriate network capabilities must be enabled in the app manifest for a Windows Store app for the system to allow network access by a Windows Store app. 如需詳細資訊,請參閱 Windows 市集應用程式的網路隔離。 For more information, see the Network Isolation for Windows Store Apps.
類別
AuthenticationManager |
管理在用戶端驗證 (Authentication) 處理期間所呼叫的驗證模組。Manages the authentication modules called during the client authentication process. |
Authorization |
包含網際網路伺服器的驗證訊息。Contains an authentication message for an Internet server. |
Cookie |
提供用來管理 Cookie 的一組屬性和方法。Provides a set of properties and methods that are used to manage cookies. 此類別無法獲得繼承。This class cannot be inherited. |
CookieCollection |
提供 Cookie 類別的執行個體 (Instance) 其集合容器 (Container)。Provides a collection container for instances of the Cookie class. |
CookieContainer |
提供 CookieCollection 物件集合的容器 (Container)。Provides a container for a collection of CookieCollection objects. |
CookieException |
將 Cookie 加入 CookieContainer 卻發生錯誤時,所擲回的例外狀況。The exception that is thrown when an error is made adding a Cookie to a CookieContainer. |
CredentialCache |
提供多個認證的儲存區。Provides storage for multiple credentials. |
Dns |
提供簡單的網域名稱解析功能。Provides simple domain name resolution functionality. |
DnsEndPoint |
將網路端點表示成主機名稱或 IP 位址和連接埠號碼的字串表示法。Represents a network endpoint as a host name or a string representation of an IP address and a port number. |
DnsPermission |
控制存取網路上的網域名稱系統 (Domain Name System,DNS) 伺服器的權限。Controls rights to access Domain Name System (DNS) servers on the network. |
DnsPermissionAttribute |
指定要求網域名稱伺服器 (Domain Name Server) 中資訊的使用權限。Specifies permission to request information from Domain Name Servers. |
DownloadDataCompletedEventArgs |
提供 DownloadDataCompleted 事件的資料。Provides data for the DownloadDataCompleted event. |
DownloadProgressChangedEventArgs |
提供 DownloadProgressChanged 的 WebClient 事件的資料。Provides data for the DownloadProgressChanged event of a WebClient. |
DownloadStringCompletedEventArgs |
提供 DownloadStringCompleted 事件的資料。Provides data for the DownloadStringCompleted event. |
EndPoint |
識別網路位址。Identifies a network address. 這是 |
EndpointPermission |
定義端點,這個端點是由 SocketPermission 執行個體 (Instance) 所授權。Defines an endpoint that is authorized by a SocketPermission instance. |
FileWebRequest |
提供 WebRequest 類別的檔案系統實作。Provides a file system implementation of the WebRequest class. |
FileWebResponse |
提供 WebResponse 類別的檔案系統實作。Provides a file system implementation of the WebResponse class. |
FtpWebRequest |
實作檔案傳輸通訊協定 (FTP) 用戶端。Implements a File Transfer Protocol (FTP) client. |
FtpWebResponse |
封裝檔案傳輸通訊協定 (File Transfer Protocol,FTP) 伺服器對要求的回應。Encapsulates a File Transfer Protocol (FTP) server's response to a request. |
GlobalProxySelection |
包含所有 HTTP 要求的全域預設 Proxy 執行個體。Contains a global default proxy instance for all HTTP requests. |
HttpListener |
提供簡單、以程式設計方式控制的 HTTP 通訊協定接聽程式。Provides a simple, programmatically controlled HTTP protocol listener. 此類別無法獲得繼承。This class cannot be inherited. |
HttpListenerBasicIdentity |
存放基本驗證要求的使用者名稱和密碼。Holds the user name and password from a basic authentication request. |
HttpListenerContext |
提供對 HttpListener 類別所使用之要求和回應物件的存取。Provides access to the request and response objects used by the HttpListener class. 此類別無法獲得繼承。This class cannot be inherited. |
HttpListenerException |
處理 HTTP 要求卻發生錯誤時,所擲回的例外狀況。The exception that is thrown when an error occurs processing an HTTP request. |
HttpListenerPrefixCollection |
表示用於儲存 HttpListener 物件之統一資源識別元 (URI) 前置詞的集合。Represents the collection used to store Uniform Resource Identifier (URI) prefixes for HttpListener objects. |
HttpListenerRequest |
描述 HttpListener 物件的連入 HTTP 要求。Describes an incoming HTTP request to an HttpListener object. 此類別無法獲得繼承。This class cannot be inherited. |
HttpListenerResponse |
表示 HttpListener 物件所處理之要求的回應。Represents a response to a request being handled by an HttpListener object. |
HttpListenerTimeoutManager |
要用於 HttpListener 物件的逾時管理員。The timeout manager to use for an HttpListener object. |
HttpVersion |
定義 HttpWebRequest 和 HttpWebResponse 類別 (Class) 支援的 HTTP 版本號碼。Defines the HTTP version numbers that are supported by the HttpWebRequest and HttpWebResponse classes. |
HttpWebRequest |
提供 WebRequest 類別的 HTTP 特定實作。Provides an HTTP-specific implementation of the WebRequest class. |
HttpWebResponse |
提供 WebResponse 類別的 HTTP 特定實作。Provides an HTTP-specific implementation of the WebResponse class. |
IPAddress |
提供網際網路通訊協定 (IP) 位址。Provides an Internet Protocol (IP) address. |
IPEndPoint |
將網路端點表示成 IP 位址和連接埠號碼。Represents a network endpoint as an IP address and a port number. |
IPEndPointCollection |
表示用來儲存網路端點以作為 IPEndPoint 物件的集合。Represents a collection used to store network endpoints as IPEndPoint objects. |
IPHostEntry |
提供網際網路主機位址資訊的容器 (Container) 類別。Provides a container class for Internet host address information. |
NetworkCredential |
提供密碼驗證配置的認證,例如基本、摘要式、NTLM 和 Kerberos 驗證。Provides credentials for password-based authentication schemes such as basic, digest, NTLM, and Kerberos authentication. |
NetworkProgressChangedEventArgs |
為網路進度已變更事件提供資料。Provides data for the network progress changed event. |
OpenReadCompletedEventArgs |
提供 OpenReadCompleted 事件的資料。Provides data for the OpenReadCompleted event. |
OpenWriteCompletedEventArgs |
提供 OpenWriteCompleted 事件的資料。Provides data for the OpenWriteCompleted event. |
ProtocolViolationException |
當使用網路通訊協定 (Protocol) 發生錯誤時,所擲回的例外狀況。The exception that is thrown when an error is made while using a network protocol. |
ServicePoint |
提供 HTTP 連接的連接管理。Provides connection management for HTTP connections. |
ServicePointManager |
管理 ServicePoint 物件的集合。Manages the collection of ServicePoint objects. |
SocketAddress |
儲存 EndPoint 衍生類別的已序列化資訊。Stores serialized information from EndPoint derived classes. |
SocketPermission |
控制在傳輸位址上進行或接受連接的權限。Controls rights to make or accept connections on a transport address. |
SocketPermissionAttribute |
指定安全性動作以控制 Socket 連接。Specifies security actions to control Socket connections. 此類別無法獲得繼承。This class cannot be inherited. |
TransportContext |
TransportContext 類別,提供有關基礎傳輸層的其他內容。The TransportContext class provides additional context about the underlying transport layer. |
UiSynchronizationContext |
為同步模型中的使用的 Managed UI 提供同步內容。Provides the synchronization context for the managed UI used in synchronization models. |
UploadDataCompletedEventArgs |
提供 UploadDataCompleted 事件的資料。Provides data for the UploadDataCompleted event. |
UploadFileCompletedEventArgs |
提供 UploadFileCompleted 事件的資料。Provides data for the UploadFileCompleted event. |
UploadProgressChangedEventArgs |
提供 UploadProgressChanged 的 WebClient 事件的資料。Provides data for the UploadProgressChanged event of a WebClient. |
UploadStringCompletedEventArgs |
提供 UploadStringCompleted 事件的資料。Provides data for the UploadStringCompleted event. |
UploadValuesCompletedEventArgs |
提供 UploadValuesCompleted 事件的資料。Provides data for the UploadValuesCompleted event. |
WebClient |
提供從 URI 所識別的資源中,傳送與接收資料的常見方法。Provides common methods for sending data to and receiving data from a resource identified by a URI. |
WebException |
當透過可外掛式通訊協定存取網路發生錯誤時,所擲回的例外狀況。The exception that is thrown when an error occurs while accessing the network through a pluggable protocol. |
WebHeaderCollection |
包含與要求或回應關聯的通訊協定 (Protocol) 標頭。Contains protocol headers associated with a request or response. |
WebPermission |
控制對 HTTP 網際網路資源存取的權限。Controls rights to access HTTP Internet resources. |
WebPermissionAttribute |
指定存取網際網路資源的使用權限。Specifies permission to access Internet resources. 此類別無法獲得繼承。This class cannot be inherited. |
WebProxy |
包含 WebRequest 類別的 HTTP Proxy 設定。Contains HTTP proxy settings for the WebRequest class. |
WebRequest |
對統一資源識別元 (URI) 提出要求。Makes a request to a Uniform Resource Identifier (URI). 這是 |
WebRequestMethods |
WebRequestMethods.Ftp、WebRequestMethods.File 和 WebRequestMethods.Http 類別的容器類別。Container class for WebRequestMethods.Ftp, WebRequestMethods.File, and WebRequestMethods.Http classes. 此類別無法獲得繼承。This class cannot be inherited. |
WebRequestMethods.File |
表示可用於 FILE 要求的檔案通訊協定方法型別。Represents the types of file protocol methods that can be used with a FILE request. 此類別無法獲得繼承。This class cannot be inherited. |
WebRequestMethods.Ftp |
表示可用於 FTP 要求的 FTP 通訊協定方法型別。Represents the types of FTP protocol methods that can be used with an FTP request. 此類別無法獲得繼承。This class cannot be inherited. |
WebRequestMethods.Http |
表示可用於 HTTP 要求的 HTTP 通訊協定方法類型。Represents the types of HTTP protocol methods that can be used with an HTTP request. |
WebResponse |
提供來自統一資源識別元 (URI) 的回應。Provides a response from a Uniform Resource Identifier (URI). 這是 |
WebUtility |
提供處理 Web 要求時用於編碼和解碼 URL 的方法。Provides methods for encoding and decoding URLs when processing Web requests. |
WriteStreamClosedEventArgs |
提供 WriteStreamClosed 事件的資料。Provides data for the WriteStreamClosed event. |
介面
IAuthenticationModule |
提供 Web 用戶端驗證模組的基底驗證介面。Provides the base authentication interface for Web client authentication modules. |
ICertificatePolicy |
驗證伺服器憑證。Validates a server certificate. |
ICredentialPolicy |
定義用於資源要求 (使用 WebRequest 及其衍生類別 (Derived Class) 所提出) 的認證原則。Defines the credential policy to be used for resource requests that are made using WebRequest and its derived classes. |
ICredentials |
提供基底驗證介面,用於擷取 Web 用戶端驗證的認證。Provides the base authentication interface for retrieving credentials for Web client authentication. |
ICredentialsByHost |
提供介面,用於擷取主機、通訊埠和驗證類型的認證。Provides the interface for retrieving credentials for a host, port, and authentication type. |
INetworkProgress |
提供有關在網路上傳送資料之網路進度的資訊Provides information on network progress in sending data over the network. |
IUnsafeWebRequestCreate |
建立對統一資源識別元 (URI) 進行的不安全 WebRequest。Creates an unsafe WebRequest to a Uniform Resource Identifier (URI). |
IWebProxy |
提供 WebRequest 類別 Proxy 存取實作 (Implementation) 的基底介面。Provides the base interface for implementation of proxy access for the WebRequest class. |
IWebProxyScript |
提供基底介面,以載入和執行自動 Proxy 偵測的指令碼。Provides the base interface to load and execute scripts for automatic proxy detection. |
IWebRequestCreate |
提供建立 WebRequest 執行個體的基底介面。Provides the base interface for creating WebRequest instances. |
列舉
AuthenticationSchemes |
指定驗證的通訊協定。Specifies protocols for authentication. |
DecompressionMethods |
表示為回應 HttpWebRequest,用來壓縮所收到之資料的檔案壓縮和解壓縮編碼格式。Represents the file compression and decompression encoding format to be used to compress the data received in response to an HttpWebRequest. |
FtpStatusCode |
指定檔案傳輸通訊協定 (FTP) 作業傳回的狀態碼。Specifies the status codes returned for a File Transfer Protocol (FTP) operation. |
HttpRequestHeader |
用戶端要求中可能指定的 HTTP 標頭。The HTTP headers that may be specified in a client request. |
HttpResponseHeader |
伺服器回應中可指定的 HTTP 標頭。The HTTP headers that can be specified in a server response. |
HttpStatusCode |
包含針對 HTTP 所定義的狀態碼值。Contains the values of status codes defined for HTTP. |
NetworkAccess |
指定網路存取權限。Specifies network access permissions. |
SecurityProtocolType |
指定 Schannel 安全性套件所支援的安全性通訊協定 (Protocol)。Specifies the security protocols that are supported by the Schannel security package. |
TransportType |
定義 SocketPermission 和 Socket 類別的傳輸類型。Defines transport types for the SocketPermission and Socket classes. |
WebExceptionStatus |
定義 WebException 類別的狀態碼。Defines status codes for the WebException class. |