82 instantiations of ConnectionAbortedException
Microsoft.AspNetCore.Connections.Abstractions (1)
ConnectionContext.cs (1)
35public override void Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via ConnectionContext.Abort()."));
Microsoft.AspNetCore.Server.Kestrel.Core (74)
Internal\Http\Http1Connection.cs (3)
127_http1Output.Abort(ServerOptions.FinOnError ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!, ConnectionEndReason.TransportCompleted); 133_http1Output.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient), ConnectionEndReason.TransportCompleted); 150Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication), ConnectionEndReason.AbortedByApp);
Internal\Http\HttpProtocol.cs (1)
1550var wrappedException = new ConnectionAbortedException("The BodyPipe was completed with an exception.", exception);
Internal\Http2\Http2Connection.cs (5)
236_frameWriter.Abort(useException ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!); 268Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestHeadersTimeout), Http2ErrorCode.INTERNAL_ERROR, ConnectionEndReason.RequestHeadersTimeout); 276Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestBodyTimeout), Http2ErrorCode.INTERNAL_ERROR, ConnectionEndReason.MinRequestBodyDataRate); 446?? new ConnectionAbortedException(CoreStrings.Http2ConnectionFaulted, error!); 1356Abort(new ConnectionAbortedException(CoreStrings.Http2ConnectionFaulted), Http2ErrorCode.ENHANCE_YOUR_CALM, ConnectionEndReason.StreamResetLimitExceeded);
Internal\Http2\Http2FrameWriter.cs (5)
170var ex = new ConnectionAbortedException("HTTP/2 connection exceeded the output operations maximum queue size."); 362_http2Connection.Abort(new ConnectionAbortedException(CoreStrings.Http2ErrorWindowUpdateSizeInvalid, connectionError), http2ErrorCode, reason); 559_http2Connection.Abort(new ConnectionAbortedException(ex.Message, ex), Http2ErrorCode.INTERNAL_ERROR, ConnectionEndReason.ErrorWritingHeaders); 600_http2Connection.Abort(new ConnectionAbortedException(ex.Message, ex), Http2ErrorCode.INTERNAL_ERROR, ConnectionEndReason.ErrorWritingHeaders); 1131_http2Connection.Abort(new ConnectionAbortedException("HTTP/2 connection exceeded the outgoing flow control maximum queue size."), Http2ErrorCode.INTERNAL_ERROR, ConnectionEndReason.FlowControlQueueSizeExceeded);
Internal\Http2\Http2OutputProducer.cs (1)
255_stream.ResetAndAbort(new ConnectionAbortedException($"{nameof(Http2OutputProducer)} has completed."), Http2ErrorCode.INTERNAL_ERROR);
Internal\Http2\Http2Stream.cs (12)
268ResetAndAbort(new ConnectionAbortedException(CoreStrings.ConnectRequestsWithProtocolRequireSchemeAndPath), Http2ErrorCode.PROTOCOL_ERROR); 277ResetAndAbort(new ConnectionAbortedException(CoreStrings.Http2ErrorConnectMustNotSendSchemeOrPath), Http2ErrorCode.PROTOCOL_ERROR); 288ResetAndAbort(new ConnectionAbortedException(CoreStrings.ProtocolRequiresConnect), Http2ErrorCode.PROTOCOL_ERROR); 303ResetAndAbort(new ConnectionAbortedException( 335ResetAndAbort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestLineTooLong), Http2ErrorCode.PROTOCOL_ERROR); 355ResetAndAbort(new ConnectionAbortedException(CoreStrings.FormatHttp2ErrorMethodInvalid(_methodText)), Http2ErrorCode.PROTOCOL_ERROR); 363ResetAndAbort(new ConnectionAbortedException(CoreStrings.FormatHttp2ErrorMethodInvalid(_methodText)), Http2ErrorCode.PROTOCOL_ERROR); 403ResetAndAbort(new ConnectionAbortedException(CoreStrings.FormatBadRequest_InvalidHostHeader_Detail(hostText)), Http2ErrorCode.PROTOCOL_ERROR); 416ResetAndAbort(new ConnectionAbortedException(CoreStrings.FormatHttp2StreamErrorPathInvalid(RawTarget)), Http2ErrorCode.PROTOCOL_ERROR); 455ResetAndAbort(new ConnectionAbortedException(CoreStrings.FormatHttp2StreamErrorPathInvalid(RawTarget)), Http2ErrorCode.PROTOCOL_ERROR); 583var abortReason = new ConnectionAbortedException(CoreStrings.Http2StreamErrorAfterHeaders); 587protected override void ApplicationAbort() => ApplicationAbort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication), Http2ErrorCode.INTERNAL_ERROR);
Internal\Http2\Http2Stream.FeatureCollection.cs (1)
64var abortReason = new ConnectionAbortedException(CoreStrings.FormatHttp2StreamResetByApplication((Http2ErrorCode)errorCode));
Internal\Http3\Http3Connection.cs (16)
143_multiplexedContext.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient)); 178session.Value.Abort(new ConnectionAbortedException(ex.Message, ex.InnerException), errorCode); 182session.Value.Abort(new ConnectionAbortedException(ex.Message), errorCode); 275stream.Abort(new("Stream timed out before its type was determined.")); 297stream.Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestHeadersTimeout), Http3ErrorCode.RequestRejected); 301stream.Abort(new ConnectionAbortedException(CoreStrings.Http3ControlStreamHeaderTimeout), Http3ErrorCode.StreamCreationError); 456Log.Http3StreamAbort(CoreStrings.FormatUnidentifiedStream(ex.StreamId), Http3ErrorCode.StreamCreationError, new(ex.Message)); 603streamContext.Abort(new ConnectionAbortedException("HTTP/3 connection is closing and no longer accepts new requests.")); 649stream.Abort(new ConnectionAbortedException(CoreStrings.ReceivedLooseWebTransportStream)); 668return new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient, error!); 671return new ConnectionAbortedException(CoreStrings.Http3ConnectionFaulted, error!); 746Abort(new ConnectionAbortedException(connectionError.Message, connectionError), connectionError.ErrorCode, ConnectionEndReason.ClosedCriticalStream); 875Abort(new ConnectionAbortedException(ex.Message, ex), ex.ErrorCode, ex.Reason); 908Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestHeadersTimeout), ConnectionEndReason.RequestHeadersTimeout); 916Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestBodyTimeout), ConnectionEndReason.MinRequestBodyDataRate); 924Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient), Http3ErrorCodeOrNoError, ConnectionEndReason.TransportCompleted);
Internal\Http3\Http3ControlStream.cs (1)
241Abort(new ConnectionAbortedException(ex.Message), ex.ErrorCode);
Internal\Http3\Http3FrameWriter.cs (4)
321_connectionContext.Abort(new ConnectionAbortedException(ex.Message, ex)); 322_http3Stream.Abort(new ConnectionAbortedException(ex.Message, ex), Http3ErrorCode.InternalError); 376_connectionContext.Abort(new ConnectionAbortedException(ex.Message, ex)); 377_http3Stream.Abort(new ConnectionAbortedException(ex.Message, ex), Http3ErrorCode.InternalError);
Internal\Http3\Http3OutputProducer.cs (1)
115_stream.Abort(new ConnectionAbortedException($"{nameof(Http3OutputProducer)}.{nameof(ProcessDataWrites)} has completed."), Http3ErrorCode.InternalError);
Internal\Http3\Http3Stream.cs (15)
186abortReason = new ConnectionAbortedException(exception.Message, exception); 214var abortReason = new ConnectionAbortedException(CoreStrings.Http3StreamErrorAfterHeaders); 582_streamAbortFeature.AbortRead((long)Http3ErrorCode.NoError, new ConnectionAbortedException("The application completed without reading the entire request body.")); 683Abort(new ConnectionAbortedException(ex.Message, ex), ex.ErrorCode); 727?? new ConnectionAbortedException("The stream has completed.", error!); 986protected override void ApplicationAbort() => ApplicationAbort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication), Http3ErrorCode.InternalError); 1062Abort(new ConnectionAbortedException(CoreStrings.Http3ErrorConnectMustNotSendSchemeOrPath), Http3ErrorCode.ProtocolError); 1082Abort(new ConnectionAbortedException(str), Http3ErrorCode.ProtocolError); 1113Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestLineTooLong), Http3ErrorCode.RequestRejected); 1133Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3ErrorMethodInvalid(_methodText)), Http3ErrorCode.ProtocolError); 1141Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3ErrorMethodInvalid(_methodText)), Http3ErrorCode.ProtocolError); 1181Abort(new ConnectionAbortedException(CoreStrings.FormatBadRequest_InvalidHostHeader_Detail(hostText)), Http3ErrorCode.ProtocolError); 1194Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3StreamErrorPathInvalid(RawTarget)), Http3ErrorCode.ProtocolError); 1233Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3StreamErrorPathInvalid(RawTarget)), Http3ErrorCode.ProtocolError); 1303Abort(new(), Http3ErrorCode.RequestCancelled);
Internal\Http3\Http3Stream.FeatureCollection.cs (1)
58var abortReason = new ConnectionAbortedException(message);
Internal\HttpConnection.cs (2)
291Abort(new ConnectionAbortedException(CoreStrings.ConnectionTimedBecauseResponseMininumDataRateNotSatisfied), ConnectionEndReason.MinResponseDataRate); 295Abort(new ConnectionAbortedException(CoreStrings.ConnectionTimedOutByServer), ConnectionEndReason.ServerTimeout);
Internal\Infrastructure\PipeWriterHelpers\TimingPipeFlusher.cs (1)
95outputAborter.Abort(new ConnectionAbortedException(CoreStrings.ConnectionOrStreamAbortedByCancellationToken, ex), ConnectionEndReason.WriteCanceled);
Internal\Infrastructure\TransportConnectionManager.cs (1)
85connection.TransportConnection.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedDuringServerShutdown));
Internal\WebTransport\WebTransportSession.cs (4)
64Abort(new(), (Http3ErrorCode)errorCode); 109stream.Value.Abort(new ConnectionAbortedException(exception.Message, exception.InnerException)); 113stream.Value.Abort(new ConnectionAbortedException(exception.Message)); 162stream.Abort(new ConnectionAbortedException(CoreStrings.WebTransportFailedToAddStreamToPendingQueue));
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (7)
Internal\QuicConnectionContext.cs (3)
73public override void Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via MultiplexedConnectionContext.Abort().")); 156Abort(new ConnectionAbortedException("Unexpected error when accepting stream.", ex)); 170Abort(new ConnectionAbortedException("The connection timed out waiting for a response from the peer.", ex));
Internal\QuicStreamContext.cs (2)
18private static readonly ConnectionAbortedException SendGracefullyCompletedException = new ConnectionAbortedException("The QUIC transport's send loop completed gracefully."); 295error = new ConnectionAbortedException(ex.Message, ex);
src\aspnetcore\src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (1)
40void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\aspnetcore\src\Servers\Kestrel\shared\TransportMultiplexedConnection.FeatureCollection.cs (1)
31void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
76 references to ConnectionAbortedException
Microsoft.AspNetCore.Connections.Abstractions (12)
BaseConnectionContext.cs (2)
56/// <param name="abortReason">A <see cref="ConnectionAbortedException"/> describing the reason the connection is being terminated.</param> 57public abstract void Abort(ConnectionAbortedException abortReason);
ConnectionContext.cs (2)
23/// <param name="abortReason">A <see cref="ConnectionAbortedException"/> describing the reason the connection is being terminated.</param> 24public override void Abort(ConnectionAbortedException abortReason)
DefaultConnectionContext.cs (1)
99public override void Abort(ConnectionAbortedException abortReason)
Exceptions\ConnectionAbortedException.cs (3)
14/// Initializes a new instance of <see cref="ConnectionAbortedException"/>. 22/// Initializes a new instance of <see cref="ConnectionAbortedException"/>. 30/// Initializes a new instance of <see cref="ConnectionAbortedException"/>.
Features\IStreamAbortFeature.cs (4)
15/// <param name="abortReason">A <see cref="ConnectionAbortedException"/> describing the reason to abort the read side of the connection stream.</param> 16void AbortRead(long errorCode, ConnectionAbortedException abortReason); 22/// <param name="abortReason">A <see cref="ConnectionAbortedException"/> describing the reason to abort the write side of the connection stream.</param> 23void AbortWrite(long errorCode, ConnectionAbortedException abortReason);
Microsoft.AspNetCore.Server.Kestrel.Core (57)
_generated\0\LoggerMessage.g.cs (3)
862public static partial void Http2StreamResetAbort(global::Microsoft.Extensions.Logging.ILogger logger, string traceIdentifier, global::Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2ErrorCode error, global::Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason) 968public static partial void Http2QueueOperationsExceeded(global::Microsoft.Extensions.Logging.ILogger logger, string connectionId, global::Microsoft.AspNetCore.Connections.ConnectionAbortedException ex) 1192public static partial void Http3StreamAbort(global::Microsoft.Extensions.Logging.ILogger logger, string traceIdentifier, string error, global::Microsoft.AspNetCore.Connections.ConnectionAbortedException abortReason)
Internal\Http\Http1ChunkedEncodingMessageBody.cs (1)
72catch (ConnectionAbortedException ex)
Internal\Http\Http1Connection.cs (1)
140public void Abort(ConnectionAbortedException abortReason, ConnectionEndReason reason)
Internal\Http\Http1ContentLengthMessageBody.cs (1)
64catch (ConnectionAbortedException ex)
Internal\Http\Http1MessageBody.cs (1)
103catch (OperationCanceledException ex) when (ex is ConnectionAbortedException || ex is TaskCanceledException)
Internal\Http\Http1OutputProducer.cs (1)
462public void Abort(ConnectionAbortedException error, ConnectionEndReason reason)
Internal\Http\HttpProtocol.cs (2)
618catch (ConnectionAbortedException ex) 1550var wrappedException = new ConnectionAbortedException("The BodyPipe was completed with an exception.", exception);
Internal\Http\HttpRequestStream.cs (1)
107catch (ConnectionAbortedException ex)
Internal\Http\IHttpOutputAborter.cs (1)
10void Abort(ConnectionAbortedException abortReason, ConnectionEndReason reason);
Internal\Http2\Http2Connection.cs (5)
246public void Abort(ConnectionAbortedException ex, ConnectionEndReason reason) 251public void Abort(ConnectionAbortedException ex, Http2ErrorCode errorCode, ConnectionEndReason reason) 415catch (ConnectionAbortedException ex) 445var connectionError = error as ConnectionAbortedException
Internal\Http2\Http2FrameWriter.cs (2)
170var ex = new ConnectionAbortedException("HTTP/2 connection exceeded the output operations maximum queue size."); 458public void Abort(ConnectionAbortedException error)
Internal\Http2\Http2MessageBody.cs (1)
115catch (ConnectionAbortedException ex)
Internal\Http2\Http2OutputProducer.cs (1)
248void IHttpOutputAborter.Abort(ConnectionAbortedException abortReason, ConnectionEndReason reason)
Internal\Http2\Http2Stream.cs (3)
583var abortReason = new ConnectionAbortedException(CoreStrings.Http2StreamErrorAfterHeaders); 589private void ApplicationAbort(ConnectionAbortedException abortReason, Http2ErrorCode error) 594internal void ResetAndAbort(ConnectionAbortedException abortReason, Http2ErrorCode error)
Internal\Http2\Http2Stream.FeatureCollection.cs (1)
64var abortReason = new ConnectionAbortedException(CoreStrings.FormatHttp2StreamResetByApplication((Http2ErrorCode)errorCode));
Internal\Http3\Http3Connection.cs (5)
157public void Abort(ConnectionAbortedException ex, ConnectionEndReason reason) 162public void Abort(ConnectionAbortedException ex, Http3ErrorCode errorCode, ConnectionEndReason reason) 487catch (ConnectionAbortedException ex) 659private static ConnectionAbortedException CreateConnectionAbortError(Exception? error, bool clientAbort) 661if (error is ConnectionAbortedException abortedException)
Internal\Http3\Http3ControlStream.cs (1)
91public void Abort(ConnectionAbortedException abortReason, Http3ErrorCode errorCode)
Internal\Http3\Http3FrameWriter.cs (1)
425public void Abort(ConnectionAbortedException error)
Internal\Http3\Http3MessageBody.cs (1)
83catch (ConnectionAbortedException ex)
Internal\Http3\Http3OutputProducer.cs (1)
108void IHttpOutputAborter.Abort(ConnectionAbortedException abortReason, ConnectionEndReason reason)
Internal\Http3\Http3PendingStream.cs (2)
11private ConnectionAbortedException? _abortedException; 25public void Abort(ConnectionAbortedException exception)
Internal\Http3\Http3Stream.cs (7)
163public void Abort(ConnectionAbortedException abortReason, Http3ErrorCode errorCode) 184if (!(exception is ConnectionAbortedException abortReason)) 214var abortReason = new ConnectionAbortedException(CoreStrings.Http3StreamErrorAfterHeaders); 692catch (ConnectionAbortedException ex) 726var streamError = error as ConnectionAbortedException 988private void ApplicationAbort(ConnectionAbortedException abortReason, Http3ErrorCode error)
Internal\Http3\Http3Stream.FeatureCollection.cs (1)
58var abortReason = new ConnectionAbortedException(message);
Internal\Http3\IHttp3Stream.cs (1)
50void Abort(ConnectionAbortedException abortReason, Http3ErrorCode errorCode);
Internal\HttpConnection.cs (1)
191private void Abort(ConnectionAbortedException ex, ConnectionEndReason reason)
Internal\Infrastructure\KestrelTrace.Http2.cs (4)
27public void Http2StreamResetAbort(string traceIdentifier, Http2ErrorCode error, ConnectionAbortedException abortReason) 68public void Http2QueueOperationsExceeded(string connectionId, ConnectionAbortedException ex) 115public static partial void Http2StreamResetAbort(ILogger logger, string traceIdentifier, Http2ErrorCode error, ConnectionAbortedException abortReason); 136public static partial void Http2QueueOperationsExceeded(ILogger logger, string connectionId, ConnectionAbortedException ex);
Internal\Infrastructure\KestrelTrace.Http3.cs (2)
28public void Http3StreamAbort(string traceIdentifier, Http3ErrorCode error, ConnectionAbortedException abortReason) 84public static partial void Http3StreamAbort(ILogger logger, string traceIdentifier, string error, ConnectionAbortedException abortReason);
Internal\IRequestProcessor.cs (1)
17void Abort(ConnectionAbortedException ex, ConnectionEndReason reason);
Internal\WebTransport\WebTransportSession.cs (1)
91internal void Abort(ConnectionAbortedException exception, Http3ErrorCode error)
Internal\WebTransport\WebTransportStream.cs (1)
77public override void Abort(ConnectionAbortedException abortReason)
Middleware\LoggingMultiplexedConnectionMiddleware.cs (2)
52public override void Abort(ConnectionAbortedException abortReason) 106public override void Abort(ConnectionAbortedException abortReason)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (7)
Internal\QuicConnectionContext.cs (1)
75public override void Abort(ConnectionAbortedException abortReason)
Internal\QuicStreamContext.cs (2)
18private static readonly ConnectionAbortedException SendGracefullyCompletedException = new ConnectionAbortedException("The QUIC transport's send loop completed gracefully."); 480public override void Abort(ConnectionAbortedException abortReason)
Internal\QuicStreamContext.FeatureCollection.cs (2)
59public void AbortRead(long errorCode, ConnectionAbortedException abortReason) 81public void AbortWrite(long errorCode, ConnectionAbortedException abortReason)
src\aspnetcore\src\Servers\Kestrel\shared\TransportConnection.cs (1)
70public override void Abort(ConnectionAbortedException abortReason)
src\aspnetcore\src\Servers\Kestrel\shared\TransportMultiplexedConnection.cs (1)
57public override void Abort(ConnectionAbortedException abortReason)