Edit

Share via


HttpRequestError Enum

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Defines error categories representing the reason for HttpRequestException or HttpIOException.

C#
public enum HttpRequestError
Inheritance
HttpRequestError

Fields

Name Value Description
Unknown 0

A generic or unknown error occurred.

NameResolutionError 1

The DNS name resolution failed.

ConnectionError 2

A transport-level failure occurred while connecting to the remote endpoint.

SecureConnectionError 3

An error occurred during the TLS handshake.

HttpProtocolError 4

An HTTP/2 or HTTP/3 protocol error occurred.

ExtendedConnectNotSupported 5

Extended CONNECT for WebSockets over HTTP/2 is not supported by the peer.

VersionNegotiationError 6

Cannot negotiate the HTTP version requested.

UserAuthenticationError 7

The authentication failed.

ProxyTunnelError 8

An error occurred while establishing a connection to the proxy tunnel.

InvalidResponse 9

An invalid or malformed response has been received.

ResponseEnded 10

The response ended prematurely.

ConfigurationLimitExceeded 11

The response exceeded a pre-configured limit such as MaxResponseContentBufferSize or MaxResponseHeadersLength.

Applies to

Product Versions
.NET 8, 9, 10