mscorlib(4.0.0.0) API with additions
System.Net Namespace Reference

Classes

class  AuthenticationManager
 Manages the authentication modules called during the client authentication process. More...
 
class  Authorization
 Contains an authentication message for an Internet server. More...
 
class  Cookie
 Provides a set of properties and methods that are used to manage cookies. This class cannot be inherited. More...
 
class  CookieCollection
 Provides a collection container for instances of the T:System.Net.Cookie class. More...
 
class  CookieContainer
 Provides a container for a collection of T:System.Net.CookieCollection objects. More...
 
class  CookieException
 The exception that is thrown when an error is made adding a T:System.Net.Cookie to a T:System.Net.CookieContainer. More...
 
class  CredentialCache
 Provides storage for multiple credentials. More...
 
class  Dns
 Provides simple domain name resolution functionality. More...
 
class  DnsEndPoint
 Represents a network endpoint as a host name or a string representation of an IP address and a port number. More...
 
class  DnsPermission
 Controls rights to access Domain Name System (DNS) servers on the network. More...
 
class  DnsPermissionAttribute
 Specifies permission to request information from Domain Name Servers. More...
 
class  DownloadDataCompletedEventArgs
 Provides data for the E:System.Net.WebClient.DownloadDataCompleted event. More...
 
class  DownloadProgressChangedEventArgs
 Provides data for the E:System.Net.WebClient.DownloadProgressChanged event of a T:System.Net.WebClient. More...
 
class  DownloadStringCompletedEventArgs
 Provides data for the E:System.Net.WebClient.DownloadStringCompleted event. More...
 
class  EndPoint
 Identifies a network address. This is an abstract class. More...
 
class  EndpointPermission
 Defines an endpoint that is authorized by a T:System.Net.SocketPermission instance. More...
 
class  FileWebRequest
 Provides a file system implementation of the T:System.Net.WebRequest class. More...
 
class  FileWebResponse
 Provides a file system implementation of the T:System.Net.WebResponse class. More...
 
class  FtpWebRequest
 Implements a File Transfer Protocol (FTP) client. More...
 
class  FtpWebResponse
 Encapsulates a File Transfer Protocol (FTP) server's response to a request. More...
 
class  GlobalProxySelection
 Contains a global default proxy instance for all HTTP requests. More...
 
class  HttpListener
 Provides a simple, programmatically controlled HTTP protocol listener. This class cannot be inherited. More...
 
class  HttpListenerBasicIdentity
 Holds the user name and password from a basic authentication request. More...
 
class  HttpListenerContext
 Provides access to the request and response objects used by the T:System.Net.HttpListener class. This class cannot be inherited. More...
 
class  HttpListenerException
 The exception that is thrown when an error occurs processing an HTTP request. More...
 
class  HttpListenerPrefixCollection
 Represents the collection used to store Uniform Resource Identifier (URI) prefixes for T:System.Net.HttpListener objects. More...
 
class  HttpListenerRequest
 Describes an incoming HTTP request to an T:System.Net.HttpListener object. This class cannot be inherited. More...
 
class  HttpListenerResponse
 Represents a response to a request being handled by an T:System.Net.HttpListener object. More...
 
class  HttpListenerTimeoutManager
 The timeout manager to use for an T:System.Net.HttpListener object. More...
 
class  HttpVersion
 Defines the HTTP version numbers that are supported by the T:System.Net.HttpWebRequest and T:System.Net.HttpWebResponse classes. More...
 
class  HttpWebRequest
 Provides an HTTP-specific implementation of the T:System.Net.WebRequest class. More...
 
class  HttpWebResponse
 Provides an HTTP-specific implementation of the T:System.Net.WebResponse class. More...
 
interface  IAuthenticationModule
 Provides the base authentication interface for Web client authentication modules. More...
 
interface  ICertificatePolicy
 Validates a server certificate. More...
 
interface  ICredentialPolicy
 Defines the credential policy to be used for resource requests that are made using T:System.Net.WebRequest and its derived classes. More...
 
interface  ICredentials
 Provides the base authentication interface for retrieving credentials for Web client authentication. More...
 
interface  ICredentialsByHost
 Provides the interface for retrieving credentials for a host, port, and authentication type. More...
 
class  IPAddress
 Provides an Internet Protocol (IP) address. More...
 
class  IPEndPoint
 Represents a network endpoint as an IP address and a port number. More...
 
class  IPHostEntry
 Provides a container class for Internet host address information. More...
 
interface  IWebProxy
 Provides the base interface for implementation of proxy access for the T:System.Net.WebRequest class. More...
 
interface  IWebProxyScript
 Provides the base interface to load and execute scripts for automatic proxy detection. More...
 
interface  IWebRequestCreate
 Provides the base interface for creating T:System.Net.WebRequest instances. More...
 
class  NetworkCredential
 Provides credentials for password-based authentication schemes such as basic, digest, NTLM, and Kerberos authentication. More...
 
class  OpenReadCompletedEventArgs
 Provides data for the E:System.Net.WebClient.OpenReadCompleted event. More...
 
class  OpenWriteCompletedEventArgs
 Provides data for the E:System.Net.WebClient.OpenWriteCompleted event. More...
 
class  ProtocolViolationException
 The exception that is thrown when an error is made while using a network protocol. More...
 
class  ServicePoint
 Provides connection management for HTTP connections. More...
 
class  ServicePointManager
 Manages the collection of T:System.Net.ServicePoint objects. More...
 
class  SocketAddress
 Stores serialized information from T:System.Net.EndPoint derived classes. More...
 
class  SocketPermission
 Controls rights to make or accept connections on a transport address. More...
 
class  SocketPermissionAttribute
 Specifies security actions to control T:System.Net.Sockets.Socket connections. This class cannot be inherited. More...
 
class  TransportContext
 The T:System.Net.TransportContext class provides additional context about the underlying transport layer. More...
 
class  UploadDataCompletedEventArgs
 Provides data for the E:System.Net.WebClient.UploadDataCompleted event. More...
 
class  UploadFileCompletedEventArgs
 Provides data for the E:System.Net.WebClient.UploadFileCompleted event. More...
 
class  UploadProgressChangedEventArgs
 Provides data for the E:System.Net.WebClient.UploadProgressChanged event of a T:System.Net.WebClient. More...
 
class  UploadStringCompletedEventArgs
 Provides data for the E:System.Net.WebClient.UploadStringCompleted event. More...
 
class  UploadValuesCompletedEventArgs
 Provides data for the E:System.Net.WebClient.UploadValuesCompleted event. More...
 
class  WebClient
 Provides common methods for sending data to and receiving data from a resource identified by a URI. More...
 
class  WebException
 The exception that is thrown when an error occurs while accessing the network through a pluggable protocol. More...
 
class  WebHeaderCollection
 Contains protocol headers associated with a request or response. More...
 
class  WebPermission
 Controls rights to access HTTP Internet resources. More...
 
class  WebPermissionAttribute
 Specifies permission to access Internet resources. This class cannot be inherited. More...
 
class  WebProxy
 Contains HTTP proxy settings for the T:System.Net.WebRequest class. More...
 
class  WebRequest
 Makes a request to a Uniform Resource Identifier (URI). This is an abstract class. More...
 
class  WebRequestMethods
 Container class for T:System.Net.WebRequestMethods.Ftp, T:System.Net.WebRequestMethods.File, and T:System.Net.WebRequestMethods.Http classes. This class cannot be inherited More...
 
class  WebResponse
 Provides a response from a Uniform Resource Identifier (URI). This is an abstract class. More...
 
class  WebUtility
 Provides methods for encoding and decoding URLs when processing Web requests. More...
 
class  WriteStreamClosedEventArgs
 Provides data for the E:System.Net.WebClient.WriteStreamClosed event. More...
 

Enumerations

enum  AddressInfoHints { AI_PASSIVE = 0x1, AI_CANONNAME = 0x2, AI_NUMERICHOST = 0x4, AI_FQDN = 0x20000 }
 
enum  Alg {
  Any = 0x0, ClassSignture = 0x2000, ClassEncrypt = 0x6000, ClassHash = 0x8000,
  ClassKeyXch = 0xA000, TypeRSA = 0x400, TypeBlock = 0x600, TypeStream = 0x800,
  TypeDH = 0xA00, NameDES = 0x1, NameRC2 = 0x2, Name3DES = 0x3,
  NameAES_128 = 0xE, NameAES_192 = 0xF, NameAES_256 = 0x10, NameAES = 0x11,
  NameRC4 = 0x1, NameMD5 = 0x3, NameSHA = 0x4, NameSHA256 = 0xC,
  NameSHA384 = 0xD, NameSHA512 = 0xE, NameDH_Ephem = 0x2
}
 
enum  AuthenticationSchemes {
  AuthenticationSchemes.None = 0x0, AuthenticationSchemes.Digest = 0x1, AuthenticationSchemes.Negotiate = 0x2, AuthenticationSchemes.Ntlm = 0x4,
  AuthenticationSchemes.Basic = 0x8, AuthenticationSchemes.Anonymous = 0x8000, AuthenticationSchemes.IntegratedWindowsAuthentication = 0x6
}
 Specifies protocols for authentication. More...
 
enum  BoundaryType {
  ContentLength = 0, Chunked = 1, Multipart = 3, None = 4,
  Invalid = 5
}
 
enum  BufferType {
  Empty = 0, Data = 1, Token = 2, Parameters = 3,
  Missing = 4, Extra = 5, Trailer = 6, Header = 7,
  Padding = 9, Stream = 10, ChannelBindings = 14, TargetHost = 0x10,
  ReadOnlyFlag = int.MinValue, ReadOnlyWithChecksum = 0x10000000
}
 
enum  CertificateEncoding {
  Zero = 0, X509AsnEncoding = 1, X509NdrEncoding = 2, Pkcs7AsnEncoding = 0x10000,
  Pkcs7NdrEncoding = 0x20000, AnyAsnEncoding = 65537
}
 
enum  CertificateProblem {
  OK = 0, TrustNOSIGNATURE = -2146762496, CertEXPIRED = -2146762495, CertVALIDITYPERIODNESTING = -2146762494,
  CertROLE = -2146762493, CertPATHLENCONST = -2146762492, CertCRITICAL = -2146762491, CertPURPOSE = -2146762490,
  CertISSUERCHAINING = -2146762489, CertMALFORMED = -2146762488, CertUNTRUSTEDROOT = -2146762487, CertCHAINING = -2146762486,
  CertREVOKED = -2146762484, CertUNTRUSTEDTESTROOT = -2146762483, CertREVOCATION_FAILURE = -2146762482, CertCN_NO_MATCH = -2146762481,
  CertWRONG_USAGE = -2146762480, TrustEXPLICITDISTRUST = -2146762479, CertUNTRUSTEDCA = -2146762478, CertINVALIDPOLICY = -2146762477,
  CertINVALIDNAME = -2146762476, CryptNOREVOCATIONCHECK = -2146885614, CryptREVOCATIONOFFLINE = -2146885613, TrustSYSTEMERROR = -2146869247,
  TrustNOSIGNERCERT = -2146869246, TrustCOUNTERSIGNER = -2146869245, TrustCERTSIGNATURE = -2146869244, TrustTIMESTAMP = -2146869243,
  TrustBADDIGEST = -2146869232, TrustBASICCONSTRAINTS = -2146869223, TrustFINANCIALCRITERIA = -2146869218
}
 
enum  CertUsage { MatchTypeAnd, MatchTypeOr }
 
enum  ChainPolicyType {
  Base = 1, Authenticode, Authenticode_TS, SSL,
  BasicConstraints, NtAuth
}
 
enum  CloseExState { Normal = 0x0, Abort = 0x1, Silent = 0x2 }
 
enum  ConnectionModes { Single, Persistent, Pipeline, Mux }
 
enum  ContentTypeValues {
  ChangeCipherSpec = 20, Alert = 21, HandShake = 22, AppData = 23,
  Unrecognized = 0xFF
}
 
enum  ContextAttribute {
  Sizes = 0, Names = 1, Lifespan = 2, DceInfo = 3,
  StreamSizes = 4, Authority = 6, PackageInfo = 10, NegotiationInfo = 12,
  UniqueBindings = 25, EndpointBindings = 26, ClientSpecifiedSpn = 27, RemoteCertificate = 83,
  LocalCertificate = 84, RootStore = 85, IssuerListInfoEx = 89, ConnectionInfo = 90,
  UiInfo = 104
}
 
enum  ContextFlags {
  Zero = 0x0, Delegate = 0x1, MutualAuth = 0x2, ReplayDetect = 0x4,
  SequenceDetect = 0x8, Confidentiality = 0x10, UseSessionKey = 0x20, AllocateMemory = 0x100,
  Connection = 0x800, InitExtendedError = 0x4000, AcceptExtendedError = 0x8000, InitStream = 0x8000,
  AcceptStream = 0x10000, InitIntegrity = 0x10000, AcceptIntegrity = 0x20000, InitManualCredValidation = 0x80000,
  InitUseSuppliedCreds = 0x80, InitIdentify = 0x20000, AcceptIdentify = 0x80000, ProxyBindings = 0x4000000,
  AllowMissingBindings = 0x10000000, UnverifiedTargetName = 0x20000000
}
 
enum  CookieToken {
  Nothing, NameValuePair, Attribute, EndToken,
  EndCookie, End, Equals, Comment,
  CommentUrl, CookieName, Discard, Domain,
  Expires, MaxAge, Path, Port,
  Secure, HttpOnly, Unknown, Version
}
 
enum  CookieVariant {
  Unknown = 0, Plain = 1, Rfc2109 = 2, Rfc2965 = 3,
  Default = 2
}
 
enum  CredentialUse { Inbound = 1, Outbound, Both }
 
enum  DataParseStatus {
  NeedMoreData, ContinueParsing, Done, Invalid,
  DataTooBig
}
 
enum  DecompressionMethods { DecompressionMethods.None = 0x0, DecompressionMethods.GZip = 0x1, DecompressionMethods.Deflate = 0x2 }
 Represents the file compression and decompression encoding format to be used to compress the data received in response to an T:System.Net.HttpWebRequest. More...
 
enum  DefaultPorts {
  DEFAULT_FTP_PORT = 21, DEFAULT_GOPHER_PORT = 70, DEFAULT_HTTP_PORT = 80, DEFAULT_HTTPS_PORT = 443,
  DEFAULT_NNTP_PORT = 119, DEFAULT_SMTP_PORT = 25, DEFAULT_TELNET_PORT = 23
}
 
enum  Endianness { Network = 0, Native = 0x10 }
 
enum  EntitySendFormat { ContentLength, Chunked }
 
enum  FtpLoginState : byte { NotLoggedIn, LoggedIn, LoggedInButNeedsRelogin, ReloginFailed }
 
enum  FtpMethodFlags {
  None = 0x0, IsDownload = 0x1, IsUpload = 0x2, TakesParameter = 0x4,
  MayTakeParameter = 0x8, DoesNotTakeParameter = 0x10, ParameterIsDirectory = 0x20, ShouldParseForResponseUri = 0x40,
  HasHttpCommand = 0x80, MustChangeWorkingDirectoryToPath = 0x100
}
 
enum  FtpOperation {
  DownloadFile, ListDirectory, ListDirectoryDetails, UploadFile,
  UploadFileUnique, AppendFile, DeleteFile, GetDateTimestamp,
  GetFileSize, Rename, MakeDirectory, RemoveDirectory,
  PrintWorkingDirectory, Other
}
 
enum  FtpPrimitive { Upload, Download, CommandOnly }
 
enum  FtpStatusCode {
  FtpStatusCode.Undefined = 0, FtpStatusCode.RestartMarker = 110, FtpStatusCode.ServiceTemporarilyNotAvailable = 120, FtpStatusCode.DataAlreadyOpen = 125,
  FtpStatusCode.OpeningData = 150, FtpStatusCode.CommandOK = 200, FtpStatusCode.CommandExtraneous = 202, FtpStatusCode.DirectoryStatus = 212,
  FtpStatusCode.FileStatus = 213, FtpStatusCode.SystemType = 215, FtpStatusCode.SendUserCommand = 220, FtpStatusCode.ClosingControl = 221,
  FtpStatusCode.ClosingData = 226, FtpStatusCode.EnteringPassive = 227, FtpStatusCode.LoggedInProceed = 230, FtpStatusCode.ServerWantsSecureSession = 234,
  FtpStatusCode.FileActionOK = 250, FtpStatusCode.PathnameCreated = 257, FtpStatusCode.SendPasswordCommand = 331, FtpStatusCode.NeedLoginAccount = 332,
  FtpStatusCode.FileCommandPending = 350, FtpStatusCode.ServiceNotAvailable = 421, FtpStatusCode.CantOpenData = 425, FtpStatusCode.ConnectionClosed = 426,
  FtpStatusCode.ActionNotTakenFileUnavailableOrBusy = 450, FtpStatusCode.ActionAbortedLocalProcessingError = 451, FtpStatusCode.ActionNotTakenInsufficientSpace = 452, FtpStatusCode.CommandSyntaxError = 500,
  FtpStatusCode.ArgumentSyntaxError = 501, FtpStatusCode.CommandNotImplemented = 502, FtpStatusCode.BadCommandSequence = 503, FtpStatusCode.NotLoggedIn = 530,
  FtpStatusCode.AccountNeeded = 532, FtpStatusCode.ActionNotTakenFileUnavailable = 550, FtpStatusCode.ActionAbortedUnknownPageType = 551, FtpStatusCode.FileActionAborted = 552,
  FtpStatusCode.ActionNotTakenFilenameNotAllowed = 553
}
 Specifies the status codes returned for a File Transfer Protocol (FTP) operation. More...
 
enum  HttpBehaviour : byte { Unknown, HTTP10, HTTP11PartiallyCompliant, HTTP11 }
 
enum  HttpProcessingResult { Continue, ReadWait, WriteWait }
 
enum  HttpRequestHeader {
  HttpRequestHeader.CacheControl, HttpRequestHeader.Connection, HttpRequestHeader.Date, HttpRequestHeader.KeepAlive,
  HttpRequestHeader.Pragma, HttpRequestHeader.Trailer, HttpRequestHeader.TransferEncoding, HttpRequestHeader.Upgrade,
  HttpRequestHeader.Via, HttpRequestHeader.Warning, HttpRequestHeader.Allow, HttpRequestHeader.ContentLength,
  HttpRequestHeader.ContentType, HttpRequestHeader.ContentEncoding, HttpRequestHeader.ContentLanguage, HttpRequestHeader.ContentLocation,
  HttpRequestHeader.ContentMd5, HttpRequestHeader.ContentRange, HttpRequestHeader.Expires, HttpRequestHeader.LastModified,
  HttpRequestHeader.Accept, HttpRequestHeader.AcceptCharset, HttpRequestHeader.AcceptEncoding, HttpRequestHeader.AcceptLanguage,
  HttpRequestHeader.Authorization, HttpRequestHeader.Cookie, HttpRequestHeader.Expect, HttpRequestHeader.From,
  HttpRequestHeader.Host, HttpRequestHeader.IfMatch, HttpRequestHeader.IfModifiedSince, HttpRequestHeader.IfNoneMatch,
  HttpRequestHeader.IfRange, HttpRequestHeader.IfUnmodifiedSince, HttpRequestHeader.MaxForwards, HttpRequestHeader.ProxyAuthorization,
  HttpRequestHeader.Referer, HttpRequestHeader.Range, HttpRequestHeader.Te, HttpRequestHeader.Translate,
  HttpRequestHeader.UserAgent
}
 The HTTP headers that may be specified in a client request. More...
 
enum  HttpResponseHeader {
  HttpResponseHeader.CacheControl, HttpResponseHeader.Connection, HttpResponseHeader.Date, HttpResponseHeader.KeepAlive,
  HttpResponseHeader.Pragma, HttpResponseHeader.Trailer, HttpResponseHeader.TransferEncoding, HttpResponseHeader.Upgrade,
  HttpResponseHeader.Via, HttpResponseHeader.Warning, HttpResponseHeader.Allow, HttpResponseHeader.ContentLength,
  HttpResponseHeader.ContentType, HttpResponseHeader.ContentEncoding, HttpResponseHeader.ContentLanguage, HttpResponseHeader.ContentLocation,
  HttpResponseHeader.ContentMd5, HttpResponseHeader.ContentRange, HttpResponseHeader.Expires, HttpResponseHeader.LastModified,
  HttpResponseHeader.AcceptRanges, HttpResponseHeader.Age, HttpResponseHeader.ETag, HttpResponseHeader.Location,
  HttpResponseHeader.ProxyAuthenticate, HttpResponseHeader.RetryAfter, HttpResponseHeader.Server, HttpResponseHeader.SetCookie,
  HttpResponseHeader.Vary, HttpResponseHeader.WwwAuthenticate
}
 The HTTP headers that can be specified in a server response. More...
 
enum  HttpStatusCode {
  HttpStatusCode.Continue = 100, HttpStatusCode.SwitchingProtocols = 101, HttpStatusCode.OK = 200, HttpStatusCode.Created = 201,
  HttpStatusCode.Accepted = 202, HttpStatusCode.NonAuthoritativeInformation = 203, HttpStatusCode.NoContent = 204, HttpStatusCode.ResetContent = 205,
  HttpStatusCode.PartialContent = 206, HttpStatusCode.MultipleChoices = 300, HttpStatusCode.Ambiguous = 300, HttpStatusCode.MovedPermanently = 301,
  HttpStatusCode.Moved = 301, HttpStatusCode.Found = 302, HttpStatusCode.Redirect = 302, HttpStatusCode.SeeOther = 303,
  HttpStatusCode.RedirectMethod = 303, HttpStatusCode.NotModified = 304, HttpStatusCode.UseProxy = 305, HttpStatusCode.Unused = 306,
  HttpStatusCode.TemporaryRedirect = 307, HttpStatusCode.RedirectKeepVerb = 307, HttpStatusCode.BadRequest = 400, HttpStatusCode.Unauthorized = 401,
  HttpStatusCode.PaymentRequired = 402, HttpStatusCode.Forbidden = 403, HttpStatusCode.NotFound = 404, HttpStatusCode.MethodNotAllowed = 405,
  HttpStatusCode.NotAcceptable = 406, HttpStatusCode.ProxyAuthenticationRequired = 407, HttpStatusCode.RequestTimeout = 408, HttpStatusCode.Conflict = 409,
  HttpStatusCode.Gone = 410, HttpStatusCode.LengthRequired = 411, HttpStatusCode.PreconditionFailed = 412, HttpStatusCode.RequestEntityTooLarge = 413,
  HttpStatusCode.RequestUriTooLong = 414, HttpStatusCode.UnsupportedMediaType = 415, HttpStatusCode.RequestedRangeNotSatisfiable = 416, HttpStatusCode.ExpectationFailed = 417,
  HttpStatusCode.UpgradeRequired = 426, HttpStatusCode.InternalServerError = 500, HttpStatusCode.NotImplemented = 501, HttpStatusCode.BadGateway = 502,
  HttpStatusCode.ServiceUnavailable = 503, HttpStatusCode.GatewayTimeout = 504, HttpStatusCode.HttpVersionNotSupported = 505
}
 Contains the values of status codes defined for HTTP. More...
 
enum  HttpWriteMode {
  Unknown, ContentLength, Chunked, Buffer,
  None
}
 
enum  IgnoreCertProblem {
  not_time_valid = 1, ctl_not_time_valid = 2, not_time_nested = 4, invalid_basic_constraints = 8,
  all_not_time_valid = 7, allow_unknown_ca = 0x10, wrong_usage = 0x20, invalid_name = 0x40,
  invalid_policy = 0x80, end_rev_unknown = 0x100, ctl_signer_rev_unknown = 0x200, ca_rev_unknown = 0x400,
  root_rev_unknown = 0x800, all_rev_unknown = 3840, none = 0xFFF
}
 
enum  ListenerClientCertState { NotInitialized, InProgress, Completed }
 
enum  NameInfoFlags {
  NI_NOFQDN = 0x1, NI_NUMERICHOST = 0x2, NI_NAMEREQD = 0x4, NI_NUMERICSERV = 0x8,
  NI_DGRAM = 0x10
}
 
enum  NetworkAccess { NetworkAccess.Accept = 0x80, NetworkAccess.Connect = 0x40 }
 Specifies network access permissions. More...
 
enum  NetworkingPerfCounterName {
  SocketConnectionsEstablished, SocketBytesReceived, SocketBytesSent, SocketDatagramsReceived,
  SocketDatagramsSent, HttpWebRequestCreated, HttpWebRequestAvgLifeTime, HttpWebRequestAvgLifeTimeBase,
  HttpWebRequestQueued, HttpWebRequestAvgQueueTime, HttpWebRequestAvgQueueTimeBase, HttpWebRequestAborted,
  HttpWebRequestFailed
}
 
enum  ReadState { Start, StatusLine, Headers, Data }
 
enum  SchProtocols {
  Zero = 0x0, PctClient = 0x2, PctServer = 0x1, Pct = 0x3,
  Ssl2Client = 0x8, Ssl2Server = 0x4, Ssl2 = 0xC, Ssl3Client = 0x20,
  Ssl3Server = 0x10, Ssl3 = 0x30, Tls10Client = 0x80, Tls10Server = 0x40,
  Tls10 = 0xC0, Tls11Client = 0x200, Tls11Server = 0x100, Tls11 = 0x300,
  Tls12Client = 0x800, Tls12Server = 0x400, Tls12 = 0xC00, Ssl3Tls = 0xF0,
  UniClient = int.MinValue, UniServer = 0x40000000, Unified = -1073741824, ClientMask = -2147480918,
  ServerMask = 0x40000555
}
 
enum  SecurDll { SECURITY, SECUR32, SCHANNEL }
 
enum  SecurityProtocolType {
  SecurityProtocolType.SystemDefault = 0x0, SecurityProtocolType.Ssl3 = 0x30, SecurityProtocolType.Tls = 0xC0, SecurityProtocolType.Tls11 = 0x300,
  SecurityProtocolType.Tls12 = 0xC00
}
 Specifies the security protocols that are supported by the Schannel security package. More...
 
enum  SecurityStatus {
  OK = 0, ContinueNeeded = 590610, CompleteNeeded = 590611, CompAndContinue = 590612,
  ContextExpired = 590615, CredentialsNeeded = 590624, Renegotiate = 590625, OutOfMemory = -2146893056,
  InvalidHandle = -2146893055, Unsupported = -2146893054, TargetUnknown = -2146893053, InternalError = -2146893052,
  PackageNotFound = -2146893051, NotOwner = -2146893050, CannotInstall = -2146893049, InvalidToken = -2146893048,
  CannotPack = -2146893047, QopNotSupported = -2146893046, NoImpersonation = -2146893045, LogonDenied = -2146893044,
  UnknownCredentials = -2146893043, NoCredentials = -2146893042, MessageAltered = -2146893041, OutOfSequence = -2146893040,
  NoAuthenticatingAuthority = -2146893039, IncompleteMessage = -2146893032, IncompleteCredentials = -2146893024, BufferNotEnough = -2146893023,
  WrongPrincipal = -2146893022, TimeSkew = -2146893020, UntrustedRoot = -2146893019, IllegalMessage = -2146893018,
  CertUnknown = -2146893017, CertExpired = -2146893016, AlgorithmMismatch = -2146893007, SecurityQosFailed = -2146893006,
  SmartcardLogonRequired = -2146892994, UnsupportedPreauth = -2146892989, BadBinding = -2146892986
}
 
enum  SocketConstructorFlags {
  WSA_FLAG_OVERLAPPED = 0x1, WSA_FLAG_MULTIPOINT_C_ROOT = 0x2, WSA_FLAG_MULTIPOINT_C_LEAF = 0x4, WSA_FLAG_MULTIPOINT_D_ROOT = 0x8,
  WSA_FLAG_MULTIPOINT_D_LEAF = 0x10
}
 
enum  ThreadKinds {
  Unknown = 0x0, User = 0x1, System = 0x2, Sync = 0x4,
  Async = 0x8, Timer = 0x10, CompletionPort = 0x20, Worker = 0x40,
  Finalization = 0x80, Other = 0x100, OwnerMask = 0x3, SyncMask = 0xC,
  SourceMask = 0x1F0, SafeSources = 0x160, ThreadPool = 0x60
}
 
enum  TransportType {
  TransportType.Udp = 1, TransportType.Connectionless = 1, TransportType.Tcp = 2, TransportType.ConnectionOriented = 2,
  TransportType.All = 3
}
 Defines transport types for the T:System.Net.SocketPermission and T:System.Net.Sockets.Socket classes. More...
 
enum  TriState { Unspecified = -1, False, True }
 
enum  WebExceptionInternalStatus { RequestFatal, ServicePointFatal, Recoverable, Isolated }
 
enum  WebExceptionStatus {
  WebExceptionStatus.Success, WebExceptionStatus.NameResolutionFailure, WebExceptionStatus.ConnectFailure, WebExceptionStatus.ReceiveFailure,
  WebExceptionStatus.SendFailure, WebExceptionStatus.PipelineFailure, WebExceptionStatus.RequestCanceled, WebExceptionStatus.ProtocolError,
  WebExceptionStatus.ConnectionClosed, WebExceptionStatus.TrustFailure, WebExceptionStatus.SecureChannelFailure, WebExceptionStatus.ServerProtocolViolation,
  WebExceptionStatus.KeepAliveFailure, WebExceptionStatus.Pending, WebExceptionStatus.Timeout, WebExceptionStatus.ProxyNameResolutionFailure,
  WebExceptionStatus.UnknownError, WebExceptionStatus.MessageLengthLimitExceeded, WebExceptionStatus.CacheEntryNotFound, WebExceptionStatus.RequestProhibitedByCachePolicy,
  WebExceptionStatus.RequestProhibitedByProxy
}
 Defines status codes for the T:System.Net.WebException class. More...
 
enum  WebHeaderCollectionType : ushort {
  Unknown, WebRequest, WebResponse, HttpWebRequest,
  HttpWebResponse, HttpListenerRequest, HttpListenerResponse, FtpWebRequest,
  FtpWebResponse, FileWebRequest, FileWebResponse
}
 
enum  WebParseErrorCode {
  Generic, InvalidHeaderName, InvalidContentLength, IncompleteHeaderLine,
  CrLfError, InvalidChunkFormat, UnexpectedServerResponse
}
 
enum  WebParseErrorSection { Generic, ResponseHeader, ResponseStatusLine, ResponseBody }
 
enum  WindowsInstallationType {
  Unknown, Client, Server, ServerCore,
  Embedded
}
 
enum  WriteBufferState { Disabled, Headers, Buffer, Playback }
 

Functions

internal delegate void AsyncProtocolCallback (AsyncProtocolRequest asyncRequest)
 
delegate AuthenticationSchemes AuthenticationSchemeSelector (HttpListenerRequest httpRequest)
 Selects the authentication scheme for an T:System.Net.HttpListener instance. More...
 
delegate IPEndPoint BindIPEndPoint (ServicePoint servicePoint, IPEndPoint remoteEndPoint, int retryCount)
 Represents the method that specifies a local Internet Protocol address and port number for a T:System.Net.ServicePoint. More...
 
internal delegate void CompletionDelegate (byte[] responseBytes, Exception exception, object State)
 
internal delegate PooledStream CreateConnectionDelegate (ConnectionPool pool)
 
delegate void DownloadDataCompletedEventHandler (object sender, DownloadDataCompletedEventArgs e)
 Represents the method that will handle the E:System.Net.WebClient.DownloadDataCompleted event of a T:System.Net.WebClient. More...
 
delegate void DownloadProgressChangedEventHandler (object sender, DownloadProgressChangedEventArgs e)
 Represents the method that will handle the E:System.Net.WebClient.DownloadProgressChanged event of a T:System.Net.WebClient. More...
 
delegate void DownloadStringCompletedEventHandler (object sender, DownloadStringCompletedEventArgs e)
 Represents the method that will handle the E:System.Net.WebClient.DownloadStringCompleted event of a T:System.Net.WebClient. More...
 
internal delegate void GeneralAsyncDelegate (object request, object state)
 
internal delegate string [] HeaderParser (string value)
 
internal delegate bool HttpAbortDelegate (HttpWebRequest request, WebException webException)
 
delegate void HttpContinueDelegate (int StatusCode, WebHeaderCollection httpHeaders)
 Represents the method that notifies callers when a continue response is received by the client. More...
 
delegate void OpenReadCompletedEventHandler (object sender, OpenReadCompletedEventArgs e)
 Represents the method that will handle the E:System.Net.WebClient.OpenReadCompleted event of a T:System.Net.WebClient. More...
 
delegate void OpenWriteCompletedEventHandler (object sender, OpenWriteCompletedEventArgs e)
 Represents the method that will handle the E:System.Net.WebClient.OpenWriteCompleted event of a T:System.Net.WebClient. More...
 
internal delegate void UnlockConnectionDelegate ()
 
delegate void UploadDataCompletedEventHandler (object sender, UploadDataCompletedEventArgs e)
 Represents the method that will handle the E:System.Net.WebClient.UploadDataCompleted event of a T:System.Net.WebClient. More...
 
delegate void UploadFileCompletedEventHandler (object sender, UploadFileCompletedEventArgs e)
 Represents the method that will handle the E:System.Net.WebClient.UploadFileCompleted event of a T:System.Net.WebClient. More...
 
delegate void UploadProgressChangedEventHandler (object sender, UploadProgressChangedEventArgs e)
 Represents the method that will handle the E:System.Net.WebClient.UploadProgressChanged event of a T:System.Net.WebClient. More...
 
delegate void UploadStringCompletedEventHandler (object sender, UploadStringCompletedEventArgs e)
 Represents the method that will handle the E:System.Net.WebClient.UploadStringCompleted event of a T:System.Net.WebClient. More...
 
delegate void UploadValuesCompletedEventHandler (object sender, UploadValuesCompletedEventArgs e)
 Represents the method that will handle the E:System.Net.WebClient.UploadValuesCompleted event of a T:System.Net.WebClient. More...
 
delegate void WriteStreamClosedEventHandler (object sender, WriteStreamClosedEventArgs e)
 Represents the method that will handle the E:System.Net.WebClient.WriteStreamClosed event of a T:System.Net.WebClient. More...
 

Enumeration Type Documentation

◆ AuthenticationSchemes

Specifies protocols for authentication.

Enumerator
None 

No authentication is allowed. A client requesting an T:System.Net.HttpListener object with this flag set will always receive a 403 Forbidden status. Use this flag when a resource should never be served to a client.

Digest 

Specifies digest authentication.

Negotiate 

Negotiates with the client to determine the authentication scheme. If both client and server support Kerberos, it is used; otherwise, NTLM is used.

Ntlm 

Specifies NTLM authentication.

Basic 

Specifies basic authentication.

Anonymous 

Specifies anonymous authentication.

IntegratedWindowsAuthentication 

Specifies Windows authentication.

Definition at line 6 of file AuthenticationSchemes.cs.

◆ DecompressionMethods

Represents the file compression and decompression encoding format to be used to compress the data received in response to an T:System.Net.HttpWebRequest.

Enumerator
None 

Do not use compression.

GZip 

Use the gZip compression-decompression algorithm.

Deflate 

Use the deflate compression-decompression algorithm.

Definition at line 6 of file DecompressionMethods.cs.

◆ FtpStatusCode

Specifies the status codes returned for a File Transfer Protocol (FTP) operation.

Enumerator
Undefined 

Included for completeness, this value is never returned by servers.

RestartMarker 

Specifies that the response contains a restart marker reply. The text of the description that accompanies this status contains the user data stream marker and the server marker.

ServiceTemporarilyNotAvailable 

Specifies that the service is not available now; try your request later.

DataAlreadyOpen 

Specifies that the data connection is already open and the requested transfer is starting.

OpeningData 

Specifies that the server is opening the data connection.

CommandOK 

Specifies that the command completed successfully.

CommandExtraneous 

Specifies that the command is not implemented by the server because it is not needed.

DirectoryStatus 

Specifies the status of a directory.

FileStatus 

Specifies the status of a file.

SystemType 

Specifies the system type name using the system names published in the Assigned Numbers document published by the Internet Assigned Numbers Authority.

SendUserCommand 

Specifies that the server is ready for a user login operation.

ClosingControl 

Specifies that the server is closing the control connection.

ClosingData 

Specifies that the server is closing the data connection and that the requested file action was successful.

EnteringPassive 

Specifies that the server is entering passive mode.

LoggedInProceed 

Specifies that the user is logged in and can send commands.

ServerWantsSecureSession 

Specifies that the server accepts the authentication mechanism specified by the client, and the exchange of security data is complete.

FileActionOK 

Specifies that the requested file action completed successfully.

PathnameCreated 

Specifies that the requested path name was created.

SendPasswordCommand 

Specifies that the server expects a password to be supplied.

NeedLoginAccount 

Specifies that the server requires a login account to be supplied.

FileCommandPending 

Specifies that the requested file action requires additional information.

ServiceNotAvailable 

Specifies that the service is not available.

CantOpenData 

Specifies that the data connection cannot be opened.

ConnectionClosed 

Specifies that the connection has been closed.

ActionNotTakenFileUnavailableOrBusy 

Specifies that the requested action cannot be performed on the specified file because the file is not available or is being used.

ActionAbortedLocalProcessingError 

Specifies that an error occurred that prevented the request action from completing.

ActionNotTakenInsufficientSpace 

Specifies that the requested action cannot be performed because there is not enough space on the server.

CommandSyntaxError 

Specifies that the command has a syntax error or is not a command recognized by the server.

ArgumentSyntaxError 

Specifies that one or more command arguments has a syntax error.

CommandNotImplemented 

Specifies that the command is not implemented by the FTP server.

BadCommandSequence 

Specifies that the sequence of commands is not in the correct order.

NotLoggedIn 

Specifies that login information must be sent to the server.

AccountNeeded 

Specifies that a user account on the server is required.

ActionNotTakenFileUnavailable 

Specifies that the requested action cannot be performed on the specified file because the file is not available.

ActionAbortedUnknownPageType 

Specifies that the requested action cannot be taken because the specified page type is unknown. Page types are described in RFC 959 Section 3.1.2.3

FileActionAborted 

Specifies that the requested action cannot be performed.

ActionNotTakenFilenameNotAllowed 

Specifies that the requested action cannot be performed on the specified file.

Definition at line 4 of file FtpStatusCode.cs.

◆ HttpRequestHeader

The HTTP headers that may be specified in a client request.

Enumerator
CacheControl 

The Cache-Control header, which specifies directives that must be obeyed by all cache control mechanisms along the request/response chain.

Connection 

The Connection header, which specifies options that are desired for a particular connection.

Date 

The Date header, which specifies the date and time at which the request originated.

KeepAlive 

The Keep-Alive header, which specifies a parameter used into order to maintain a persistent connection.

Pragma 

The Pragma header, which specifies implementation-specific directives that might apply to any agent along the request/response chain.

Trailer 

The Trailer header, which specifies the header fields present in the trailer of a message encoded with chunked transfer-coding.

TransferEncoding 

The Transfer-Encoding header, which specifies what (if any) type of transformation that has been applied to the message body.

Upgrade 

The Upgrade header, which specifies additional communications protocols that the client supports.

Via 

The Via header, which specifies intermediate protocols to be used by gateway and proxy agents.

Warning 

The Warning header, which specifies additional information about that status or transformation of a message that might not be reflected in the message.

Allow 

The Allow header, which specifies the set of HTTP methods supported.

ContentLength 

The Content-Length header, which specifies the length, in bytes, of the accompanying body data.

ContentType 

The Content-Type header, which specifies the MIME type of the accompanying body data.

ContentEncoding 

The Content-Encoding header, which specifies the encodings that have been applied to the accompanying body data.

ContentLanguage 

The Content-Langauge header, which specifies the natural language(s) of the accompanying body data.

ContentLocation 

The Content-Location header, which specifies a URI from which the accompanying body may be obtained.

ContentMd5 

The Content-MD5 header, which specifies the MD5 digest of the accompanying body data, for the purpose of providing an end-to-end message integrity check.

ContentRange 

The Content-Range header, which specifies where in the full body the accompanying partial body data should be applied.

Expires 

The Expires header, which specifies the date and time after which the accompanying body data should be considered stale.

LastModified 

The Last-Modified header, which specifies the date and time at which the accompanying body data was last modified.

Accept 

The Accept header, which specifies the MIME types that are acceptable for the response.

AcceptCharset 

The Accept-Charset header, which specifies the character sets that are acceptable for the response.

AcceptEncoding 

The Accept-Encoding header, which specifies the content encodings that are acceptable for the response.

AcceptLanguage 

The Accept-Langauge header, which specifies that natural languages that are preferred for the response.

Authorization 

The Authorization header, which specifies the credentials that the client presents in order to authenticate itself to the server.

Cookie 

The Cookie header, which specifies cookie data presented to the server.

Expect 

The Expect header, which specifies particular server behaviors that are required by the client.

From 

The From header, which specifies an Internet E-mail address for the human user who controls the requesting user agent.

Host 

The Host header, which specifies the host name and port number of the resource being requested.

IfMatch 

The If-Match header, which specifies that the requested operation should be performed only if the client's cached copy of the indicated resource is current.

IfModifiedSince 

The If-Modified-Since header, which specifies that the requested operation should be performed only if the requested resource has been modified since the indicated data and time.

IfNoneMatch 

The If-None-Match header, which specifies that the requested operation should be performed only if none of client's cached copies of the indicated resources are current.

IfRange 

The If-Range header, which specifies that only the specified range of the requested resource should be sent, if the client's cached copy is current.

IfUnmodifiedSince 

The If-Unmodified-Since header, which specifies that the requested operation should be performed only if the requested resource has not been modified since the indicated date and time.

MaxForwards 

The Max-Forwards header, which specifies an integer indicating the remaining number of times that this request may be forwarded.

ProxyAuthorization 

The Proxy-Authorization header, which specifies the credentials that the client presents in order to authenticate itself to a proxy.

Referer 

The Referer header, which specifies the URI of the resource from which the request URI was obtained.

Range 

The Range header, which specifies the the sub-range(s) of the response that the client requests be returned in lieu of the entire response.

Te 

The TE header, which specifies the transfer encodings that are acceptable for the response.

Translate 

The Translate header, a Microsoft extension to the HTTP specification used in conjunction with WebDAV functionality.

UserAgent 

The User-Agent header, which specifies information about the client agent.

Definition at line 5 of file HttpRequestHeader.cs.

◆ HttpResponseHeader

The HTTP headers that can be specified in a server response.

Enumerator
CacheControl 

The Cache-Control header, which specifies caching directives that must be obeyed by all caching mechanisms along the request/response chain.

Connection 

The Connection header, which specifies options that are desired for a particular connection.

Date 

The Date header, which specifies the date and time at which the response originated.

KeepAlive 

The Keep-Alive header, which specifies a parameter to be used to maintain a persistent connection.

Pragma 

The Pragma header, which specifies implementation-specific directives that might apply to any agent along the request/response chain.

Trailer 

The Trailer header, which specifies that the indicated header fields are present in the trailer of a message that is encoded with chunked transfer-coding.

TransferEncoding 

The Transfer-Encoding header, which specifies what (if any) type of transformation has been applied to the message body.

Upgrade 

The Upgrade header, which specifies additional communications protocols that the client supports.

Via 

The Via header, which specifies intermediate protocols to be used by gateway and proxy agents.

Warning 

The Warning header, which specifies additional information about that status or transformation of a message that might not be reflected in the message.

Allow 

The Allow header, which specifies the set of HTTP methods that are supported.

ContentLength 

The Content-Length header, which specifies the length, in bytes, of the accompanying body data.

ContentType 

The Content-Type header, which specifies the MIME type of the accompanying body data.

ContentEncoding 

The Content-Encoding header, which specifies the encodings that have been applied to the accompanying body data.

ContentLanguage 

The Content-Langauge header, which specifies the natural language or languages of the accompanying body data.

ContentLocation 

The Content-Location header, which specifies a URI from which the accompanying body can be obtained.

ContentMd5 

The Content-MD5 header, which specifies the MD5 digest of the accompanying body data, for the purpose of providing an end-to-end message integrity check.

ContentRange 

The Range header, which specifies the subrange or subranges of the response that the client requests be returned in lieu of the entire response.

Expires 

The Expires header, which specifies the date and time after which the accompanying body data should be considered stale.

LastModified 

The Last-Modified header, which specifies the date and time at which the accompanying body data was last modified.

AcceptRanges 

The Accept-Ranges header, which specifies the range that is accepted by the server.

Age 

The Age header, which specifies the time, in seconds, since the response was generated by the originating server.

ETag 

The Etag header, which specifies the current value for the requested variant.

Location 

The Location header, which specifies a URI to which the client is redirected to obtain the requested resource.

ProxyAuthenticate 

The Proxy-Authenticate header, which specifies that the client must authenticate itself to a proxy.

RetryAfter 

The Retry-After header, which specifies a time (in seconds), or a date and time, after which the client can retry its request.

Server 

The Server header, which specifies information about the originating server agent.

SetCookie 

The Set-Cookie header, which specifies cookie data that is presented to the client.

Vary 

The Vary header, which specifies the request headers that are used to determine whether a cached response is fresh.

WwwAuthenticate 

The WWW-Authenticate header, which specifies that the client must authenticate itself to the server.

Definition at line 5 of file HttpResponseHeader.cs.

◆ HttpStatusCode

Contains the values of status codes defined for HTTP.

Enumerator
Continue 

Equivalent to HTTP status 100. F:System.Net.HttpStatusCode.Continue indicates that the client can continue with its request.

SwitchingProtocols 

Equivalent to HTTP status 101. F:System.Net.HttpStatusCode.SwitchingProtocols indicates that the protocol version or protocol is being changed.

OK 

Equivalent to HTTP status 200. F:System.Net.HttpStatusCode.OK indicates that the request succeeded and that the requested information is in the response. This is the most common status code to receive.

Created 

Equivalent to HTTP status 201. F:System.Net.HttpStatusCode.Created indicates that the request resulted in a new resource created before the response was sent.

Accepted 

Equivalent to HTTP status 202. F:System.Net.HttpStatusCode.Accepted indicates that the request has been accepted for further processing.

NonAuthoritativeInformation 

Equivalent to HTTP status 203. F:System.Net.HttpStatusCode.NonAuthoritativeInformation indicates that the returned metainformation is from a cached copy instead of the origin server and therefore may be incorrect.

NoContent 

Equivalent to HTTP status 204. F:System.Net.HttpStatusCode.NoContent indicates that the request has been successfully processed and that the response is intentionally blank.

ResetContent 

Equivalent to HTTP status 205. F:System.Net.HttpStatusCode.ResetContent indicates that the client should reset (not reload) the current resource.

PartialContent 

Equivalent to HTTP status 206. F:System.Net.HttpStatusCode.PartialContent indicates that the response is a partial response as requested by a GET request that includes a byte range.

MultipleChoices 

Equivalent to HTTP status 300. F:System.Net.HttpStatusCode.MultipleChoices indicates that the requested information has multiple representations. The default action is to treat this status as a redirect and follow the contents of the Location header associated with this response.

Ambiguous 

Equivalent to HTTP status 300. F:System.Net.HttpStatusCode.Ambiguous indicates that the requested information has multiple representations. The default action is to treat this status as a redirect and follow the contents of the Location header associated with this response.

MovedPermanently 

Equivalent to HTTP status 301. F:System.Net.HttpStatusCode.MovedPermanently indicates that the requested information has been moved to the URI specified in the Location header. The default action when this status is received is to follow the Location header associated with the response.

Moved 

Equivalent to HTTP status 301. F:System.Net.HttpStatusCode.Moved indicates that the requested information has been moved to the URI specified in the Location header. The default action when this status is received is to follow the Location header associated with the response. When the original request method was POST, the redirected request will use the GET method.

Found 

Equivalent to HTTP status 302. F:System.Net.HttpStatusCode.Found indicates that the requested information is located at the URI specified in the Location header. The default action when this status is received is to follow the Location header associated with the response. When the original request method was POST, the redirected request will use the GET method.

Redirect 

Equivalent to HTTP status 302. F:System.Net.HttpStatusCode.Redirect indicates that the requested information is located at the URI specified in the Location header. The default action when this status is received is to follow the Location header associated with the response. When the original request method was POST, the redirected request will use the GET method.

SeeOther 

Equivalent to HTTP status 303. F:System.Net.HttpStatusCode.SeeOther automatically redirects the client to the URI specified in the Location header as the result of a POST. The request to the resource specified by the Location header will be made with a GET.

RedirectMethod 

Equivalent to HTTP status 303. F:System.Net.HttpStatusCode.RedirectMethod automatically redirects the client to the URI specified in the Location header as the result of a POST. The request to the resource specified by the Location header will be made with a GET.

NotModified 

Equivalent to HTTP status 304. F:System.Net.HttpStatusCode.NotModified indicates that the client's cached copy is up to date. The contents of the resource are not transferred.

UseProxy 

Equivalent to HTTP status 305. F:System.Net.HttpStatusCode.UseProxy indicates that the request should use the proxy server at the URI specified in the Location header.

Unused 

Equivalent to HTTP status 306. F:System.Net.HttpStatusCode.Unused is a proposed extension to the HTTP/1.1 specification that is not fully specified.

TemporaryRedirect 

Equivalent to HTTP status 307. F:System.Net.HttpStatusCode.TemporaryRedirect indicates that the request information is located at the URI specified in the Location header. The default action when this status is received is to follow the Location header associated with the response. When the original request method was POST, the redirected request will also use the POST method.

RedirectKeepVerb 

Equivalent to HTTP status 307. F:System.Net.HttpStatusCode.RedirectKeepVerb indicates that the request information is located at the URI specified in the Location header. The default action when this status is received is to follow the Location header associated with the response. When the original request method was POST, the redirected request will also use the POST method.

BadRequest 

Equivalent to HTTP status 400. F:System.Net.HttpStatusCode.BadRequest indicates that the request could not be understood by the server. F:System.Net.HttpStatusCode.BadRequest is sent when no other error is applicable, or if the exact error is unknown or does not have its own error code.

Unauthorized 

Equivalent to HTTP status 401. F:System.Net.HttpStatusCode.Unauthorized indicates that the requested resource requires authentication. The WWW-Authenticate header contains the details of how to perform the authentication.

PaymentRequired 

Equivalent to HTTP status 402. F:System.Net.HttpStatusCode.PaymentRequired is reserved for future use.

Forbidden 

Equivalent to HTTP status 403. F:System.Net.HttpStatusCode.Forbidden indicates that the server refuses to fulfill the request.

NotFound 

Equivalent to HTTP status 404. F:System.Net.HttpStatusCode.NotFound indicates that the requested resource does not exist on the server.

MethodNotAllowed 

Equivalent to HTTP status 405. F:System.Net.HttpStatusCode.MethodNotAllowed indicates that the request method (POST or GET) is not allowed on the requested resource.

NotAcceptable 

Equivalent to HTTP status 406. F:System.Net.HttpStatusCode.NotAcceptable indicates that the client has indicated with Accept headers that it will not accept any of the available representations of the resource.

ProxyAuthenticationRequired 

Equivalent to HTTP status 407. F:System.Net.HttpStatusCode.ProxyAuthenticationRequired indicates that the requested proxy requires authentication. The Proxy-authenticate header contains the details of how to perform the authentication.

RequestTimeout 

Equivalent to HTTP status 408. F:System.Net.HttpStatusCode.RequestTimeout indicates that the client did not send a request within the time the server was expecting the request.

Conflict 

Equivalent to HTTP status 409. F:System.Net.HttpStatusCode.Conflict indicates that the request could not be carried out because of a conflict on the server.

Gone 

Equivalent to HTTP status 410. F:System.Net.HttpStatusCode.Gone indicates that the requested resource is no longer available.

LengthRequired 

Equivalent to HTTP status 411. F:System.Net.HttpStatusCode.LengthRequired indicates that the required Content-length header is missing.

PreconditionFailed 

Equivalent to HTTP status 412. F:System.Net.HttpStatusCode.PreconditionFailed indicates that a condition set for this request failed, and the request cannot be carried out. Conditions are set with conditional request headers like If-Match, If-None-Match, or If-Unmodified-Since.

RequestEntityTooLarge 

Equivalent to HTTP status 413. F:System.Net.HttpStatusCode.RequestEntityTooLarge indicates that the request is too large for the server to process.

RequestUriTooLong 

Equivalent to HTTP status 414. F:System.Net.HttpStatusCode.RequestUriTooLong indicates that the URI is too long.

UnsupportedMediaType 

Equivalent to HTTP status 415. F:System.Net.HttpStatusCode.UnsupportedMediaType indicates that the request is an unsupported type.

RequestedRangeNotSatisfiable 

Equivalent to HTTP status 416. F:System.Net.HttpStatusCode.RequestedRangeNotSatisfiable indicates that the range of data requested from the resource cannot be returned, either because the beginning of the range is before the beginning of the resource, or the end of the range is after the end of the resource.

ExpectationFailed 

Equivalent to HTTP status 417. F:System.Net.HttpStatusCode.ExpectationFailed indicates that an expectation given in an Expect header could not be met by the server.

UpgradeRequired 

Equivalent to HTTP status 426. F:System.Net.HttpStatusCode.UpgradeRequired indicates that the client should switch to a different protocol such as TLS/1.0.

InternalServerError 

Equivalent to HTTP status 500. F:System.Net.HttpStatusCode.InternalServerError indicates that a generic error has occurred on the server.

NotImplemented 

Equivalent to HTTP status 501. F:System.Net.HttpStatusCode.NotImplemented indicates that the server does not support the requested function.

BadGateway 

Equivalent to HTTP status 502. F:System.Net.HttpStatusCode.BadGateway indicates that an intermediate proxy server received a bad response from another proxy or the origin server.

ServiceUnavailable 

Equivalent to HTTP status 503. F:System.Net.HttpStatusCode.ServiceUnavailable indicates that the server is temporarily unavailable, usually due to high load or maintenance.

GatewayTimeout 

Equivalent to HTTP status 504. F:System.Net.HttpStatusCode.GatewayTimeout indicates that an intermediate proxy server timed out while waiting for a response from another proxy or the origin server.

HttpVersionNotSupported 

Equivalent to HTTP status 505. F:System.Net.HttpStatusCode.HttpVersionNotSupported indicates that the requested HTTP version is not supported by the server.

Definition at line 5 of file HttpStatusCode.cs.

◆ NetworkAccess

Specifies network access permissions.

Enumerator
Accept 

Indicates that the application is allowed to accept connections from the Internet on a local resource. Notice that this is a protection for the local host that uses Accept to grant access to a local resource (address/port). At the time a socket tries to bind to this local resource a permission check is performed to see if an Accept exists on that resource.

Connect 

Indicates that the application is allowed to connect to specific Internet resources. Notice that, in the case of remote host resource, no check is performed to see that Connect permissions exist. This is because the port of a connecting remote host is unknown and not suitable permissions can be built in advance. It is the application responsibility to check the permissions of the remote host trying to connect to a listening socket.

Definition at line 5 of file NetworkAccess.cs.

◆ SecurityProtocolType

Specifies the security protocols that are supported by the Schannel security package.

Enumerator
SystemDefault 

Specifies the system default security protocol as defined by Schannel.

Ssl3 

Specifies the Secure Socket Layer (SSL) 3.0 security protocol.

Tls 

Specifies the Transport Layer Security (TLS) 1.0 security protocol.

Tls11 

Specifies the Transport Layer Security (TLS) 1.1 security protocol.

Tls12 

Specifies the Transport Layer Security (TLS) 1.2 security protocol.

Definition at line 5 of file SecurityProtocolType.cs.

◆ TransportType

Defines transport types for the T:System.Net.SocketPermission and T:System.Net.Sockets.Socket classes.

Enumerator
Udp 

UDP transport.

Connectionless 

The transport type is connectionless, such as UDP. Specifying this value has the same effect as specifying F:System.Net.TransportType.Udp.

Tcp 

TCP transport.

ConnectionOriented 

The transport is connection oriented, such as TCP. Specifying this value has the same effect as specifying F:System.Net.TransportType.Tcp.

All 

All transport types.

Definition at line 4 of file TransportType.cs.

◆ WebExceptionStatus

Defines status codes for the T:System.Net.WebException class.

Enumerator
Success 

No error was encountered.

NameResolutionFailure 

The name resolver service could not resolve the host name.

ConnectFailure 

The remote service point could not be contacted at the transport level.

ReceiveFailure 

A complete response was not received from the remote server.

SendFailure 

A complete request could not be sent to the remote server.

PipelineFailure 

The request was a piplined request and the connection was closed before the response was received.

RequestCanceled 

The request was canceled, the M:System.Net.WebRequest.Abort method was called, or an unclassifiable error occurred. This is the default value for P:System.Net.WebException.Status.

ProtocolError 

The response received from the server was complete but indicated a protocol-level error. For example, an HTTP protocol error such as 401 Access Denied would use this status.

ConnectionClosed 

The connection was prematurely closed.

TrustFailure 

A server certificate could not be validated.

SecureChannelFailure 

An error occurred while establishing a connection using SSL.

ServerProtocolViolation 

The server response was not a valid HTTP response.

KeepAliveFailure 

The connection for a request that specifies the Keep-alive header was closed unexpectedly.

Pending 

An internal asynchronous request is pending.

Timeout 

No response was received during the time-out period for a request.

ProxyNameResolutionFailure 

The name resolver service could not resolve the proxy host name.

UnknownError 

An exception of unknown type has occurred.

MessageLengthLimitExceeded 

A message was received that exceeded the specified limit when sending a request or receiving a response from the server.

CacheEntryNotFound 

The specified cache entry was not found.

RequestProhibitedByCachePolicy 

The request was not permitted by the cache policy. In general, this occurs when a request is not cacheable and the effective policy prohibits sending the request to the server. You might receive this status if a request method implies the presence of a request body, a request method requires direct interaction with the server, or a request contains a conditional header.

RequestProhibitedByProxy 

This request was not permitted by the proxy.

Definition at line 5 of file WebExceptionStatus.cs.

Function Documentation

◆ AuthenticationSchemeSelector()

delegate AuthenticationSchemes System.Net.AuthenticationSchemeSelector ( HttpListenerRequest  httpRequest)

Selects the authentication scheme for an T:System.Net.HttpListener instance.

Parameters
httpRequestThe T:System.Net.HttpListenerRequest instance for which to select an authentication scheme.
Returns
One of the T:System.Net.AuthenticationSchemes values that indicates the method of authentication to use for the specified client request.

◆ BindIPEndPoint()

delegate IPEndPoint System.Net.BindIPEndPoint ( ServicePoint  servicePoint,
IPEndPoint  remoteEndPoint,
int  retryCount 
)

Represents the method that specifies a local Internet Protocol address and port number for a T:System.Net.ServicePoint.

Parameters
servicePointThe T:System.Net.ServicePoint associated with the connection to be created.
remoteEndPointThe remote T:System.Net.IPEndPoint that specifies the remote host.
retryCountThe number of times this delegate was called for a specified connection.
Returns
The local T:System.Net.IPEndPoint to which the T:System.Net.ServicePoint is bound.
Exceptions
T:System.OverflowExceptionretryCount is equal to F:System.Int32.MaxValue

◆ DownloadDataCompletedEventHandler()

delegate void System.Net.DownloadDataCompletedEventHandler ( object  sender,
DownloadDataCompletedEventArgs  e 
)

Represents the method that will handle the E:System.Net.WebClient.DownloadDataCompleted event of a T:System.Net.WebClient.

Parameters
senderThe source of the event.
eA T:System.Net.DownloadDataCompletedEventArgs containing event data.

◆ DownloadProgressChangedEventHandler()

delegate void System.Net.DownloadProgressChangedEventHandler ( object  sender,
DownloadProgressChangedEventArgs  e 
)

Represents the method that will handle the E:System.Net.WebClient.DownloadProgressChanged event of a T:System.Net.WebClient.

Parameters
senderThe source of the event.
eA T:System.Net.DownloadProgressChangedEventArgs containing event data.

◆ DownloadStringCompletedEventHandler()

delegate void System.Net.DownloadStringCompletedEventHandler ( object  sender,
DownloadStringCompletedEventArgs  e 
)

Represents the method that will handle the E:System.Net.WebClient.DownloadStringCompleted event of a T:System.Net.WebClient.

Parameters
senderThe source of the event.
eA T:System.Net.DownloadStringCompletedEventArgs that contains event data.

◆ HttpContinueDelegate()

delegate void System.Net.HttpContinueDelegate ( int  StatusCode,
WebHeaderCollection  httpHeaders 
)

Represents the method that notifies callers when a continue response is received by the client.

Parameters
StatusCodeThe numeric value of the HTTP status from the server.
httpHeadersThe headers returned with the 100-continue response from the server.

◆ OpenReadCompletedEventHandler()

delegate void System.Net.OpenReadCompletedEventHandler ( object  sender,
OpenReadCompletedEventArgs  e 
)

Represents the method that will handle the E:System.Net.WebClient.OpenReadCompleted event of a T:System.Net.WebClient.

Parameters
senderThe source of the event.
eA T:System.Net.OpenReadCompletedEventArgs containing event data.

◆ OpenWriteCompletedEventHandler()

delegate void System.Net.OpenWriteCompletedEventHandler ( object  sender,
OpenWriteCompletedEventArgs  e 
)

Represents the method that will handle the E:System.Net.WebClient.OpenWriteCompleted event of a T:System.Net.WebClient.

Parameters
senderThe source of the event.
eA T:System.Net.OpenWriteCompletedEventArgs containing event data.

◆ UploadDataCompletedEventHandler()

delegate void System.Net.UploadDataCompletedEventHandler ( object  sender,
UploadDataCompletedEventArgs  e 
)

Represents the method that will handle the E:System.Net.WebClient.UploadDataCompleted event of a T:System.Net.WebClient.

Parameters
senderThe source of the event.
eA T:System.Net.UploadDataCompletedEventArgs containing event data.

◆ UploadFileCompletedEventHandler()

delegate void System.Net.UploadFileCompletedEventHandler ( object  sender,
UploadFileCompletedEventArgs  e 
)

Represents the method that will handle the E:System.Net.WebClient.UploadFileCompleted event of a T:System.Net.WebClient.

Parameters
senderThe source of the event.
eA T:System.Net.UploadFileCompletedEventArgs that contains event data.

◆ UploadProgressChangedEventHandler()

delegate void System.Net.UploadProgressChangedEventHandler ( object  sender,
UploadProgressChangedEventArgs  e 
)

Represents the method that will handle the E:System.Net.WebClient.UploadProgressChanged event of a T:System.Net.WebClient.

Parameters
senderThe source of the event.
eA T:System.Net.UploadProgressChangedEventArgs containing event data.

◆ UploadStringCompletedEventHandler()

delegate void System.Net.UploadStringCompletedEventHandler ( object  sender,
UploadStringCompletedEventArgs  e 
)

Represents the method that will handle the E:System.Net.WebClient.UploadStringCompleted event of a T:System.Net.WebClient.

Parameters
senderThe source of the event.
eA T:System.Net.UploadStringCompletedEventArgs containing event data.

◆ UploadValuesCompletedEventHandler()

delegate void System.Net.UploadValuesCompletedEventHandler ( object  sender,
UploadValuesCompletedEventArgs  e 
)

Represents the method that will handle the E:System.Net.WebClient.UploadValuesCompleted event of a T:System.Net.WebClient.

Parameters
senderThe source of the event.
eA T:System.Net.UploadValuesCompletedEventArgs that contains event data.

◆ WriteStreamClosedEventHandler()

delegate void System.Net.WriteStreamClosedEventHandler ( object  sender,
WriteStreamClosedEventArgs  e 
)

Represents the method that will handle the E:System.Net.WebClient.WriteStreamClosed event of a T:System.Net.WebClient.