2 types derived from HttpRequestException
Microsoft.Build.Tasks.Core (1)
Microsoft.DotNet.VersionTools (1)
100 instantiations of HttpRequestException
http2cat (1)
IIS.FunctionalTests (1)
IIS.LongTests (1)
IIS.NewHandler.FunctionalTests (1)
IIS.NewShim.FunctionalTests (1)
IISExpress.FunctionalTests (1)
Microsoft.AspNetCore.Authentication.Facebook (1)
Microsoft.AspNetCore.Authentication.Google (1)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.DotNet.Helix.Sdk (1)
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Microsoft.Extensions.Http.Polly.Tests (3)
Microsoft.Extensions.Http.Resilience.Tests (6)
System.Net.Http (75)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (8)
470HttpRequestException exception = new(HttpRequestError.ExtendedConnectNotSupported, SR.net_unsupported_extended_connect);
537throw new HttpRequestException(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_server_refused, request.Version, request.VersionPolicy), e);
682stream = await streamTask.ConfigureAwait(false) ?? throw new HttpRequestException(SR.net_http_null_from_connect_callback);
769throw new HttpRequestException(SR.net_http_exception_during_plaintext_filter, e);
775throw new HttpRequestException(SR.net_http_null_from_plaintext_filter);
797throw new HttpRequestException(HttpRequestError.ProxyTunnelError, SR.Format(SR.net_http_proxy_tunnel_returned_failure_status_code, _proxyUri, (int)tunnelResponse.StatusCode), statusCode: tunnelResponse.StatusCode);
824throw new HttpRequestException(HttpRequestError.ProxyTunnelError, SR.net_http_proxy_tunnel_error, e);
847HttpRequestException ex = new(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_cannot_establish, request.Version, request.VersionPolicy, desiredVersion), inner);
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (10)
232throw new HttpRequestException(SR.Format(SR.net_http_request_content_length_mismatch, writeStream.BytesWritten, writeStream.ContentLength));
560throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response);
583throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response);
609throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection._pool.Settings.MaxResponseHeadersByteLength));
631throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response_multiple_status_codes);
638throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response_pseudo_header_in_trailer);
701throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response);
745throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response);
754throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name)));
1537return ValueTask.FromException(new HttpRequestException(SR.net_http_content_write_larger_than_content_length));
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (17)
280throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_retry_on_older_version, ex, RequestRetryType.RetryOnLowerHttpVersion);
285throw new HttpRequestException(HttpRequestError.HttpProtocolError, SR.net_http_request_aborted, rejectedException, RequestRetryType.RetryOnConnectionFailure);
291throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, innerException);
301throw new HttpRequestException(HttpRequestError.HttpProtocolError, SR.net_http_client_execution_error, abortException);
316throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException);
330throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_request_aborted, ex, RequestRetryType.RetryOnConnectionFailure);
336throw new HttpRequestException(ex.HttpRequestError, SR.net_http_client_execution_error, ex);
341throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response, ex);
346throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, ex);
358throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, ex);
458throw new HttpRequestException(SR.Format(SR.net_http_request_content_length_mismatch, sent, contentLength));
499throw new HttpRequestException(SR.net_http_content_write_larger_than_content_length);
706throw new HttpRequestException(SR.Format(SR.net_http_request_headers_exceeded_length, maxHeaderListSize));
908throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection.Pool.Settings.MaxResponseHeadersByteLength));
949throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name)));
1308throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException);
1327throw new HttpIOException(HttpRequestError.Unknown, SR.net_http_client_execution_error, new HttpRequestException(SR.net_http_client_execution_error, ex));
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (16)
322throw new HttpRequestException(SR.net_http_request_no_host);
529throw new HttpRequestException(SR.net_http_request_invalid_char_encoding);
924mappedException = new HttpRequestException(SR.net_http_client_execution_error, exception);
933mappedException = new HttpRequestException(error, SR.net_http_client_execution_error, ioe, _canRetry ? RequestRetryType.RetryOnConnectionFailure : RequestRetryType.NoRetry);
1065throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line)));
1086throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line)));
1094throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(line.Slice(9, 3))));
1119throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_reason, Encoding.ASCII.GetString(reasonBytes.ToArray())), formatEx);
1125throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line)));
1224throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_line, Encoding.ASCII.GetString(buffer.Slice(0, newLineIndex))));
1323throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, ""));
1326throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name)));
1330throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _pool.Settings.MaxResponseHeadersByteLength));
1618throw new HttpRequestException(SR.net_http_chunk_too_large);
2073throw new HttpRequestException(HttpRequestError.UserAuthenticationError, SR.net_http_authconnectionfailure);
2089throw new HttpRequestException(HttpRequestError.UserAuthenticationError, SR.net_http_authconnectionfailure);
System.Net.Http.Json (1)
202 references to HttpRequestException
Aspire.Hosting (2)
Aspire.Hosting.Azure.Tests (2)
dotnet-openapi (1)
dotnet-svcutil-lib (3)
GenerateRulesMissingDocumentation (1)
HttpStress (2)
IIS.FunctionalTests (8)
IIS.LongTests (5)
IIS.NewHandler.FunctionalTests (5)
IIS.NewShim.FunctionalTests (5)
IISExpress.FunctionalTests (7)
InMemory.FunctionalTests (1)
Interop.FunctionalTests (22)
Microsoft.AspNetCore.Authentication.Test (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (4)
Microsoft.AspNetCore.Diagnostics.Tests (1)
Microsoft.AspNetCore.InternalTesting.Tests (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (29)
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (3)
Microsoft.AspNetCore.SignalR.Client.Tests (8)
Microsoft.AspNetCore.SignalR.Tests (2)
Microsoft.AspNetCore.SpaProxy (2)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.TestHost.Tests (12)
Microsoft.Build.Tasks.Core (3)
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.Build.Tasks.Feed (3)
Microsoft.DotNet.Deployment.Tasks.Links (3)
Microsoft.DotNet.Helix.Client (1)
Microsoft.DotNet.Helix.Sdk (3)
Microsoft.DotNet.Internal.SymbolHelper (7)
Microsoft.DotNet.VersionTools (1)
Microsoft.Extensions.Http (4)
Microsoft.Extensions.Http.Diagnostics.Tests (3)
Microsoft.Extensions.Http.Polly (1)
Microsoft.Extensions.Http.Polly.Tests (2)
Microsoft.Extensions.Http.Resilience (4)
Microsoft.Extensions.Http.Resilience.PerformanceTests (2)
Microsoft.Extensions.Http.Resilience.Tests (2)
netstandard (1)
System.Net.Http (21)
System.Net.Requests (3)
System.Net.WebSockets.Client (1)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)