1 type derived from HttpRequestException
Microsoft.Build.Tasks.Core (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)
455HttpRequestException exception = new(HttpRequestError.ExtendedConnectNotSupported, SR.net_unsupported_extended_connect);
522throw new HttpRequestException(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_server_refused, request.Version, request.VersionPolicy), e);
667stream = await streamTask.ConfigureAwait(false) ?? throw new HttpRequestException(SR.net_http_null_from_connect_callback);
754throw new HttpRequestException(SR.net_http_exception_during_plaintext_filter, e);
760throw new HttpRequestException(SR.net_http_null_from_plaintext_filter);
782throw new HttpRequestException(HttpRequestError.ProxyTunnelError, SR.Format(SR.net_http_proxy_tunnel_returned_failure_status_code, _proxyUri, (int)tunnelResponse.StatusCode), statusCode: tunnelResponse.StatusCode);
809throw new HttpRequestException(HttpRequestError.ProxyTunnelError, SR.net_http_proxy_tunnel_error, e);
856HttpRequestException 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)
284throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_retry_on_older_version, ex, RequestRetryType.RetryOnLowerHttpVersion);
289throw new HttpRequestException(HttpRequestError.HttpProtocolError, SR.net_http_request_aborted, rejectedException, RequestRetryType.RetryOnConnectionFailure);
295throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, innerException);
305throw new HttpRequestException(HttpRequestError.HttpProtocolError, SR.net_http_client_execution_error, abortException);
320throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException);
334throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_request_aborted, ex, RequestRetryType.RetryOnConnectionFailure);
340throw new HttpRequestException(ex.HttpRequestError, SR.net_http_client_execution_error, ex);
345throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response, ex);
350throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, ex);
362throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, ex);
462throw new HttpRequestException(SR.Format(SR.net_http_request_content_length_mismatch, sent, contentLength));
507throw new HttpRequestException(SR.net_http_content_write_larger_than_content_length);
714throw new HttpRequestException(SR.Format(SR.net_http_request_headers_exceeded_length, maxHeaderListSize));
916throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection.Pool.Settings.MaxResponseHeadersByteLength));
957throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name)));
1316throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException);
1335throw 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);
926mappedException = new HttpRequestException(SR.net_http_client_execution_error, exception);
935mappedException = new HttpRequestException(error, SR.net_http_client_execution_error, ioe, _canRetry ? RequestRetryType.RetryOnConnectionFailure : RequestRetryType.NoRetry);
1067throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line)));
1088throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line)));
1096throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_code, Encoding.ASCII.GetString(line.Slice(9, 3))));
1121throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_reason, Encoding.ASCII.GetString(reasonBytes.ToArray())), formatEx);
1127throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_status_line, Encoding.ASCII.GetString(line)));
1226throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_line, Encoding.ASCII.GetString(buffer.Slice(0, newLineIndex))));
1325throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, ""));
1328throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name)));
1332throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _pool.Settings.MaxResponseHeadersByteLength));
1620throw new HttpRequestException(SR.net_http_chunk_too_large);
2080throw new HttpRequestException(HttpRequestError.UserAuthenticationError, SR.net_http_authconnectionfailure);
2096throw new HttpRequestException(HttpRequestError.UserAuthenticationError, SR.net_http_authconnectionfailure);
System.Net.Http.Json (1)
201 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 (2)
Microsoft.DotNet.Deployment.Tasks.Links (3)
Microsoft.DotNet.Helix.Client (1)
Microsoft.DotNet.Helix.Sdk (3)
Microsoft.DotNet.Internal.SymbolHelper (7)
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 (22)
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)