1 type derived from HttpRequestException
Microsoft.Build.Tasks.Core (1)
108 instantiations of HttpRequestException
Aspire.Cli.Tests (2)
Aspire.Hosting.Azure (1)
http2cat (1)
IIS.FunctionalTests (1)
IIS.LongTests (1)
IIS.NewHandler.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.Build.Tasks.Feed (1)
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
Microsoft.DotNet.Helix.Sdk (1)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Microsoft.Extensions.Http.Polly.Tests (3)
Microsoft.Extensions.Http.Resilience.Tests (6)
System.Net.Http (78)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (8)
460HttpRequestException exception = new(HttpRequestError.ExtendedConnectNotSupported, SR.net_unsupported_extended_connect);
527throw new HttpRequestException(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_server_refused, request.Version, request.VersionPolicy), e);
674stream = await streamTask.ConfigureAwait(false) ?? throw new HttpRequestException(SR.net_http_null_from_connect_callback);
763throw new HttpRequestException(SR.net_http_exception_during_plaintext_filter, e);
769throw new HttpRequestException(SR.net_http_null_from_plaintext_filter);
791throw new HttpRequestException(HttpRequestError.ProxyTunnelError, SR.Format(SR.net_http_proxy_tunnel_returned_failure_status_code, _proxyUri, (int)tunnelResponse.StatusCode), statusCode: tunnelResponse.StatusCode);
818throw new HttpRequestException(HttpRequestError.ProxyTunnelError, SR.net_http_proxy_tunnel_error, e);
865HttpRequestException ex = new(HttpRequestError.VersionNegotiationError, SR.Format(SR.net_http_requested_version_cannot_establish, request.Version, request.VersionPolicy, desiredVersion), inner);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (5)
1586throw new HttpRequestException(SR.Format(SR.net_http_request_headers_exceeded_length, maxHeaderListSize));
2090throw new HttpRequestException(HttpRequestError.UserAuthenticationError, SR.net_http_authconnectionfailure, null, RequestRetryType.RetryOnSessionAuthenticationChallenge);
2098throw new HttpRequestException(e.HttpRequestError, e.Message, e);
2102throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, e);
2204throw new HttpRequestException((innerException as HttpIOException)?.HttpRequestError ?? HttpRequestError.Unknown, message, innerException, RequestRetryType.RetryOnConnectionFailure);
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(ExceptionDispatchInfo.SetCurrentStackTrace(new HttpRequestException(SR.net_http_content_write_larger_than_content_length)));
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (18)
300throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_retry_on_older_version, ex, RequestRetryType.RetryOnLowerHttpVersion);
305throw new HttpRequestException(HttpRequestError.HttpProtocolError, SR.net_http_request_aborted, rejectedException, RequestRetryType.RetryOnConnectionFailure);
311throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, innerException);
321throw new HttpRequestException(HttpRequestError.HttpProtocolError, SR.net_http_client_execution_error, abortException);
336throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException);
342throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_http3_connection_quic_error, ex);
356throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_request_aborted, ex, RequestRetryType.RetryOnConnectionFailure);
362throw new HttpRequestException(ex.HttpRequestError, SR.net_http_client_execution_error, ex);
367throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.net_http_invalid_response, ex);
372throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, ex);
384throw new HttpRequestException(HttpRequestError.Unknown, SR.net_http_client_execution_error, ex);
496throw new HttpRequestException(SR.Format(SR.net_http_request_content_length_mismatch, sent, contentLength));
547throw new HttpRequestException(SR.net_http_content_write_larger_than_content_length);
764throw new HttpRequestException(SR.Format(SR.net_http_request_headers_exceeded_length, maxHeaderListSize));
966throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection.Pool.Settings.MaxResponseHeadersByteLength));
1007throw new HttpRequestException(HttpRequestError.InvalidResponse, SR.Format(SR.net_http_invalid_response_header_name, Encoding.ASCII.GetString(name)));
1366throw new HttpRequestException(httpRequestError, SR.net_http_client_execution_error, _connection.AbortException);
1385throw 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)
219 references to HttpRequestException
aspire (8)
Aspire.Cli.Tests (1)
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)
IISExpress.FunctionalTests (7)
InMemory.FunctionalTests (1)
Interop.FunctionalTests (24)
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 (12)
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.Baselines.Tasks (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.Extensions.Http (4)
Microsoft.Extensions.Http.Diagnostics.Tests (5)
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 (23)
System.Net.Requests (3)
System.Net.WebSockets.Client (1)
System.ServiceModel.Http (3)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)