Partager via


System.Net Namespace

Microsoft Silverlight will reach end of support after October 2021. Learn more.

The System.Net namespace provides a simple programming interface for many of the protocols used on networks today. 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.

Classes

  Class Description
Public class Cookie Provides an object for use with HTTP requests to persist state information for a Silverlight-based application.
Public class CookieCollection Represents a collection of Cookie objects.
Public class CookieContainer Provides a container for a collection of CookieCollection objects.
Public class CookieException The exception that is thrown when adding a Cookie to a CookieCollection.
Public class DnsEndPoint Represents a network endpoint as a host name or a string representation of an IP address and a port number.
Public class DownloadProgressChangedEventArgs Provides data for the DownloadProgressChanged event of a WebClient.
Public class DownloadStringCompletedEventArgs Provides data for the DownloadStringCompleted event.
Public class EndPoint Identifies a network address. This is an abstract class.
Public class HttpUtility Provides methods for encoding and decoding HTML and URL strings.
Public class HttpWebRequest Provides an HTTP-specific implementation of the WebRequest class.
Public class HttpWebResponse Provides an HTTP-specific implementation of the WebResponse class.
Public class IPAddress Provides an Internet Protocol (IP) address.
Public class IPEndPoint Represents a network endpoint as an IP address and a port number.
Public class NetworkCredential Provides credentials for password-based authentication schemes such as basic, digest, NTLM, and Kerberos authentication.
Public class OpenReadCompletedEventArgs Provides data for the OpenReadCompleted event.
Public class OpenWriteCompletedEventArgs Provides data for the OpenWriteCompleted event.
Public class ProtocolViolationException The exception that is thrown when an error is made while using a network protocol.
Public class SocketAddress Stores serialized information from EndPoint derived classes.
Public class UploadProgressChangedEventArgs Provides data for the UploadProgressChanged event of a WebClient.
Public class UploadStringCompletedEventArgs Provides data for the UploadStringCompleted event.
Public class WebClient Provides common methods for sending data to and receiving data from a resource identified by a URI.
Public class WebException The exception that is thrown when an error occurs while accessing the network through a pluggable protocol.
Public class WebHeaderCollection Contains protocol headers associated with a request or response.
Public class WebRequest Makes a request to a Uniform Resource Identifier (URI). This is an abstract class.
Public class WebResponse Provides a response from a Uniform Resource Identifier (URI). This is an abstract class.
Public class WriteStreamClosedEventArgs Provides data for the WriteStreamClosed event.

Interfaces

  Interface Description
Public interface ICredentials Provides the base authentication interface for retrieving credentials for Web client authentication.
Public interface IWebRequestCreate Provides the base interface for creating WebRequest instances.

Delegates

  Delegate Description
Public delegate DownloadProgressChangedEventHandler Represents the method that will handle the WebClient.DownloadProgressChanged event of a WebClient.
Public delegate DownloadStringCompletedEventHandler Represents the method that will handle the DownloadStringCompleted event of a WebClient.
Public delegate OpenReadCompletedEventHandler Represents the method that will handle the OpenReadAsync event of a WebClient.
Public delegate OpenWriteCompletedEventHandler Represents the method that will handle the OpenWriteCompleted event of a WebClient.
Public delegate UploadProgressChangedEventHandler Represents the method that will handle the UploadProgressChanged event of a WebClient.
Public delegate UploadStringCompletedEventHandler Represents the method that will handle the UploadStringCompleted event of a WebClient.
Public delegate WriteStreamClosedEventHandler Represents the method that will handle the WriteStreamClosed event of a WebClient.

Enumerations

  Enumeration Description
Public enumeration HttpRequestHeader The HTTP headers that may be specified in a client request.
Public enumeration HttpStatusCode Contains the values of status codes defined for HTTP.
Public enumeration WebExceptionStatus Defines status codes for the WebException class.