Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
WebExceptionStatus Enumeration
Collapse the table of content
Expand the table of content

WebExceptionStatus Enumeration

Defines status codes for the WebException class.

Namespace:  System.Net
Assemblies:   System.Net.Requests (in System.Net.Requests.dll)
  System (in System.dll)

public enum WebExceptionStatus

Member nameDescription
CacheEntryNotFoundThe specified cache entry was not found.
Supported by Portable Class LibraryConnectFailureThe remote service point could not be contacted at the transport level.
ConnectionClosedThe connection was prematurely closed.
KeepAliveFailureThe connection for a request that specifies the Keep-alive header was closed unexpectedly.
Supported by Portable Class LibraryMessageLengthLimitExceededA message was received that exceeded the specified limit when sending a request or receiving a response from the server.
NameResolutionFailureThe name resolver service could not resolve the host name.
Supported by Portable Class LibraryPendingAn internal asynchronous request is pending.
PipelineFailureThe request was a piplined request and the connection was closed before the response was received.
ProtocolErrorThe 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.
ProxyNameResolutionFailureThe name resolver service could not resolve the proxy host name.
ReceiveFailureA complete response was not received from the remote server.
Supported by Portable Class LibraryRequestCanceledThe request was canceled, the WebRequest.Abort method was called, or an unclassifiable error occurred. This is the default value for Status.
RequestProhibitedByCachePolicyThe 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.
RequestProhibitedByProxyThis request was not permitted by the proxy.
SecureChannelFailureAn error occurred while establishing a connection using SSL.
Supported by Portable Class LibrarySendFailureA complete request could not be sent to the remote server.
ServerProtocolViolationThe server response was not a valid HTTP response.
Supported by Portable Class LibrarySuccessNo error was encountered.
TimeoutNo response was received during the time-out period for a request.
TrustFailureA server certificate could not be validated.
Supported by Portable Class LibraryUnknownErrorAn exception of unknown type has occurred.

The WebExceptionStatus enumeration defines the status codes assigned to the Status property.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library
© 2015 Microsoft