111 instantiations of ConnectionAbortedException
ClientSample (3)
Tcp\TcpConnection.cs (3)
128error = new ConnectionAbortedException(); 135error = new ConnectionAbortedException(); 150error = error ?? new ConnectionAbortedException();
InMemory.FunctionalTests (4)
Http2\Http2ConnectionTests.cs (2)
1703_connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp); 5080_connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp);
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
1042Abort(new ConnectionAbortedException());
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (1)
39void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
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.IIS (1)
Core\IISHttpContext.IHttpRequestLifetimeFeature.cs (1)
51Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication));
Microsoft.AspNetCore.Server.Kestrel.Core (74)
Internal\Http\Http1Connection.cs (3)
104_http1Output.Abort(ServerOptions.FinOnError ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!, ConnectionEndReason.TransportCompleted); 110_http1Output.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient), ConnectionEndReason.TransportCompleted); 127Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication), ConnectionEndReason.AbortedByApp);
Internal\Http\HttpProtocol.cs (1)
1524var wrappedException = new ConnectionAbortedException("The BodyPipe was completed with an exception.", exception);
Internal\Http2\Http2Connection.cs (5)
232_frameWriter.Abort(useException ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!); 264Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestHeadersTimeout), Http2ErrorCode.INTERNAL_ERROR, ConnectionEndReason.RequestHeadersTimeout); 272Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestBodyTimeout), Http2ErrorCode.INTERNAL_ERROR, ConnectionEndReason.MinRequestBodyDataRate); 442?? new ConnectionAbortedException(CoreStrings.Http2ConnectionFaulted, error!); 1320Abort(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."); 351_http2Connection.Abort(new ConnectionAbortedException(CoreStrings.Http2ErrorWindowUpdateSizeInvalid, connectionError), http2ErrorCode, reason); 548_http2Connection.Abort(new ConnectionAbortedException(ex.Message, ex), Http2ErrorCode.INTERNAL_ERROR, ConnectionEndReason.ErrorWritingHeaders); 589_http2Connection.Abort(new ConnectionAbortedException(ex.Message, ex), Http2ErrorCode.INTERNAL_ERROR, ConnectionEndReason.ErrorWritingHeaders); 1120_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)
258_stream.ResetAndAbort(new ConnectionAbortedException($"{nameof(Http2OutputProducer)} has completed."), Http2ErrorCode.INTERNAL_ERROR);
Internal\Http2\Http2Stream.cs (12)
269ResetAndAbort(new ConnectionAbortedException(CoreStrings.ConnectRequestsWithProtocolRequireSchemeAndPath), Http2ErrorCode.PROTOCOL_ERROR); 278ResetAndAbort(new ConnectionAbortedException(CoreStrings.Http2ErrorConnectMustNotSendSchemeOrPath), Http2ErrorCode.PROTOCOL_ERROR); 289ResetAndAbort(new ConnectionAbortedException(CoreStrings.ProtocolRequiresConnect), Http2ErrorCode.PROTOCOL_ERROR); 304ResetAndAbort(new ConnectionAbortedException( 336ResetAndAbort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestLineTooLong), Http2ErrorCode.PROTOCOL_ERROR); 356ResetAndAbort(new ConnectionAbortedException(CoreStrings.FormatHttp2ErrorMethodInvalid(_methodText)), Http2ErrorCode.PROTOCOL_ERROR); 364ResetAndAbort(new ConnectionAbortedException(CoreStrings.FormatHttp2ErrorMethodInvalid(_methodText)), Http2ErrorCode.PROTOCOL_ERROR); 404ResetAndAbort(new ConnectionAbortedException(CoreStrings.FormatBadRequest_InvalidHostHeader_Detail(hostText)), Http2ErrorCode.PROTOCOL_ERROR); 417ResetAndAbort(new ConnectionAbortedException(CoreStrings.FormatHttp2StreamErrorPathInvalid(RawTarget)), Http2ErrorCode.PROTOCOL_ERROR); 456ResetAndAbort(new ConnectionAbortedException(CoreStrings.FormatHttp2StreamErrorPathInvalid(RawTarget)), Http2ErrorCode.PROTOCOL_ERROR); 584var abortReason = new ConnectionAbortedException(CoreStrings.Http2StreamErrorAfterHeaders); 588protected 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); 454Log.Http3StreamAbort(CoreStrings.FormatUnidentifiedStream(ex.StreamId), Http3ErrorCode.StreamCreationError, new(ex.Message)); 589streamContext.Abort(new ConnectionAbortedException("HTTP/3 connection is closing and no longer accepts new requests.")); 634stream.Abort(new ConnectionAbortedException(CoreStrings.ReceivedLooseWebTransportStream)); 653return new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient, error!); 656return new ConnectionAbortedException(CoreStrings.Http3ConnectionFaulted, error!); 731Abort(new ConnectionAbortedException(connectionError.Message, connectionError), connectionError.ErrorCode, ConnectionEndReason.ClosedCriticalStream); 864Abort(new ConnectionAbortedException(ex.Message, ex), ex.ErrorCode, ex.Reason); 897Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestHeadersTimeout), ConnectionEndReason.RequestHeadersTimeout); 905Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestBodyTimeout), ConnectionEndReason.MinRequestBodyDataRate); 913Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient), Http3ErrorCodeOrNoError, ConnectionEndReason.TransportCompleted);
Internal\Http3\Http3ControlStream.cs (1)
234Abort(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)
106_stream.Abort(new ConnectionAbortedException($"{nameof(Http3OutputProducer)}.{nameof(ProcessDataWrites)} has completed."), Http3ErrorCode.InternalError);
Internal\Http3\Http3Stream.cs (15)
167abortReason = new ConnectionAbortedException(exception.Message, exception); 195var abortReason = new ConnectionAbortedException(CoreStrings.Http3StreamErrorAfterHeaders); 557_streamAbortFeature.AbortRead((long)Http3ErrorCode.NoError, new ConnectionAbortedException("The application completed without reading the entire request body.")); 645Abort(new ConnectionAbortedException(ex.Message, ex), ex.ErrorCode); 689?? new ConnectionAbortedException("The stream has completed.", error!); 933protected override void ApplicationAbort() => ApplicationAbort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication), Http3ErrorCode.InternalError); 1004Abort(new ConnectionAbortedException(CoreStrings.Http3ErrorConnectMustNotSendSchemeOrPath), Http3ErrorCode.ProtocolError); 1024Abort(new ConnectionAbortedException(str), Http3ErrorCode.ProtocolError); 1055Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestLineTooLong), Http3ErrorCode.RequestRejected); 1075Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3ErrorMethodInvalid(_methodText)), Http3ErrorCode.ProtocolError); 1083Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3ErrorMethodInvalid(_methodText)), Http3ErrorCode.ProtocolError); 1123Abort(new ConnectionAbortedException(CoreStrings.FormatBadRequest_InvalidHostHeader_Detail(hostText)), Http3ErrorCode.ProtocolError); 1136Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3StreamErrorPathInvalid(RawTarget)), Http3ErrorCode.ProtocolError); 1175Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3StreamErrorPathInvalid(RawTarget)), Http3ErrorCode.ProtocolError); 1245Abort(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.Core.Tests (7)
Http1\Http1ConnectionTests.cs (7)
686_http1Connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp); 708_http1Connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp); 723_http1Connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp); 768_http1Connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp); 786_http1Connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp); 798_http1Connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp); 812_http1Connection.Abort(new ConnectionAbortedException(), ConnectionEndReason.AbortedByApp);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
1042Abort(new ConnectionAbortedException());
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (1)
39void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (2)
Internal\NamedPipeConnection.cs (1)
16private static readonly ConnectionAbortedException SendGracefullyCompletedException = new ConnectionAbortedException("The named pipe transport's send loop completed gracefully.");
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (1)
39void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
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\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (1)
39void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportMultiplexedConnection.FeatureCollection.cs (1)
30void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (8)
QuicConnectionContextTests.cs (3)
340serverStream.Abort(new ConnectionAbortedException("Test message")); 390serverStream.Abort(new ConnectionAbortedException("Test message")); 480serverStream.Abort(new ConnectionAbortedException("Test message."));
QuicStreamContextTests.cs (5)
81serverStream.Features.Get<IStreamAbortFeature>().AbortRead((long)Http3ErrorCode.NoError, new ConnectionAbortedException("Test message.")); 464serverStream.Abort(new ConnectionAbortedException("Test message")); 507streamAbortFeature.AbortRead((long)Http3ErrorCode.InternalError, new ConnectionAbortedException("Test reason")); 581Assert.Throws<ArgumentOutOfRangeException>(() => protocolErrorCodeFeature.AbortRead(errorCode, new ConnectionAbortedException())); 582Assert.Throws<ArgumentOutOfRangeException>(() => protocolErrorCodeFeature.AbortWrite(errorCode, new ConnectionAbortedException()));
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (2)
Internal\SocketConnection.cs (1)
381_shutdownReason = shutdownReason ?? new ConnectionAbortedException("The Socket transport's send loop completed gracefully.");
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (1)
39void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
159 references to ConnectionAbortedException
IIS.Tests (1)
ResponseAbortTests.cs (1)
93Assert.IsType<ConnectionAbortedException>(exception);
InMemory.FunctionalTests (51)
Http2\Http2StreamTests.cs (5)
3442Assert.IsType<ConnectionAbortedException>(thrownEx); 3471Assert.IsType<ConnectionAbortedException>(thrownEx.InnerException); 4724&& w.Exception is ConnectionAbortedException && w.Exception.InnerException == expectedException); 5546await Assert.ThrowsAsync<ConnectionAbortedException>(async () => await context.Request.BodyReader.ReadAsync()); 5714await Assert.ThrowsAsync<ConnectionAbortedException>(async () => await context.Request.BodyReader.ReadAsync());
Http2\Http2TestBase.cs (2)
176_mockConnectionContext.Setup(c => c.Abort(It.IsAny<ConnectionAbortedException>())).Callback<ConnectionAbortedException>(ex =>
Http2\Http2TimeoutTests.cs (21)
199_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e => 222_mockConnectionContext.Verify(c => c.Abort(It.IsAny<ConnectionAbortedException>()), Times.Never); 228_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e => 393_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e => 448_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e => 493await WaitForConnectionErrorAsync<ConnectionAbortedException>( 500_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e => 547await WaitForConnectionErrorAsync<ConnectionAbortedException>( 554_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e => 613await WaitForConnectionErrorAsync<ConnectionAbortedException>( 620_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e => 660await WaitForConnectionErrorAsync<ConnectionAbortedException>( 667_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e => 711await WaitForConnectionErrorAsync<ConnectionAbortedException>( 718_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e => 778await WaitForConnectionErrorAsync<ConnectionAbortedException>( 785_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e => 846await WaitForConnectionErrorAsync<ConnectionAbortedException>( 853_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e => 987await WaitForConnectionErrorAsync<ConnectionAbortedException>( 994_mockConnectionContext.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(e =>
Http3\Http3ConnectionTests.cs (1)
775public override void Abort(ConnectionAbortedException abortReason)
Http3\Http3StreamTests.cs (4)
1788await Assert.ThrowsAsync<ConnectionAbortedException>(async () => await context.Request.BodyReader.ReadAsync()); 1917await Assert.ThrowsAsync<ConnectionAbortedException>(async () => await context.Request.BodyReader.ReadAsync()); 2031await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>( 2137await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>(
Http3\Http3TimeoutTests.cs (4)
367await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>( 565await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>( 620await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>( 676await Http3Api.WaitForConnectionErrorAsync<ConnectionAbortedException>(
ResponseTests.cs (1)
4134&& w.Exception is ConnectionAbortedException && w.Exception.InnerException == expectedException);
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (9)
498public ConnectionAbortedException AbortReadException => StreamContext.AbortReadException; 499public ConnectionAbortedException AbortWriteException => StreamContext.AbortWriteException; 639catch (ConnectionAbortedException) 1045public override void Abort(ConnectionAbortedException abortReason) 1176public ConnectionAbortedException AbortReadException { get; private set; } 1177public ConnectionAbortedException AbortWriteException { get; private set; } 1214public override void Abort(ConnectionAbortedException abortReason) 1273void IStreamAbortFeature.AbortRead(long errorCode, ConnectionAbortedException abortReason) 1278void IStreamAbortFeature.AbortWrite(long errorCode, ConnectionAbortedException abortReason)
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
249public override void Abort(ConnectionAbortedException abortReason)
src\Servers\Kestrel\shared\TransportConnection.cs (1)
70public override void Abort(ConnectionAbortedException abortReason)
TestTransport\InMemoryTransportConnection.cs (2)
49public ConnectionAbortedException AbortReason { get; private set; } 53public override void Abort(ConnectionAbortedException abortReason)
Interop.FunctionalTests (3)
Http3\Http3RequestTests.cs (3)
586var serverEx = await Assert.ThrowsAsync<ConnectionAbortedException>(() => serverReadTask).DefaultTimeout(); 1941Assert.IsType<ConnectionAbortedException>(ex);
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.IIS (2)
Core\HttpRequestStream.cs (2)
65catch (ConnectionAbortedException ex) 78catch (ConnectionAbortedException ex)
Microsoft.AspNetCore.Server.Kestrel.Core (54)
Internal\Http\Http1ChunkedEncodingMessageBody.cs (1)
69catch (ConnectionAbortedException ex)
Internal\Http\Http1Connection.cs (1)
117public void Abort(ConnectionAbortedException abortReason, ConnectionEndReason reason)
Internal\Http\Http1ContentLengthMessageBody.cs (1)
64catch (ConnectionAbortedException ex)
Internal\Http\Http1MessageBody.cs (1)
101catch (OperationCanceledException ex) when (ex is ConnectionAbortedException || ex is TaskCanceledException)
Internal\Http\Http1OutputProducer.cs (1)
461public void Abort(ConnectionAbortedException error, ConnectionEndReason reason)
Internal\Http\HttpProtocol.cs (2)
603catch (ConnectionAbortedException ex) 1524var 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)
242public void Abort(ConnectionAbortedException ex, ConnectionEndReason reason) 247public void Abort(ConnectionAbortedException ex, Http2ErrorCode errorCode, ConnectionEndReason reason) 411catch (ConnectionAbortedException ex) 441var connectionError = error as ConnectionAbortedException
Internal\Http2\Http2FrameWriter.cs (2)
170var ex = new ConnectionAbortedException("HTTP/2 connection exceeded the output operations maximum queue size."); 447public void Abort(ConnectionAbortedException error)
Internal\Http2\Http2MessageBody.cs (1)
115catch (ConnectionAbortedException ex)
Internal\Http2\Http2OutputProducer.cs (1)
251void IHttpOutputAborter.Abort(ConnectionAbortedException abortReason, ConnectionEndReason reason)
Internal\Http2\Http2Stream.cs (3)
584var abortReason = new ConnectionAbortedException(CoreStrings.Http2StreamErrorAfterHeaders); 590private void ApplicationAbort(ConnectionAbortedException abortReason, Http2ErrorCode error) 595internal 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) 481catch (ConnectionAbortedException ex) 644private static ConnectionAbortedException CreateConnectionAbortError(Exception? error, bool clientAbort) 646if (error is ConnectionAbortedException abortedException)
Internal\Http3\Http3ControlStream.cs (1)
78public 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)
99void IHttpOutputAborter.Abort(ConnectionAbortedException abortReason, ConnectionEndReason reason)
Internal\Http3\Http3PendingStream.cs (2)
11private ConnectionAbortedException? _abortedException; 25public void Abort(ConnectionAbortedException exception)
Internal\Http3\Http3Stream.cs (7)
144public void Abort(ConnectionAbortedException abortReason, Http3ErrorCode errorCode) 165if (!(exception is ConnectionAbortedException abortReason)) 195var abortReason = new ConnectionAbortedException(CoreStrings.Http3StreamErrorAfterHeaders); 654catch (ConnectionAbortedException ex) 688var streamError = error as ConnectionAbortedException 935private void ApplicationAbort(ConnectionAbortedException abortReason, Http3ErrorCode error)
Internal\Http3\Http3Stream.FeatureCollection.cs (1)
58var abortReason = new ConnectionAbortedException(message);
Internal\Http3\IHttp3Stream.cs (1)
45void 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.Core.Tests (8)
ConnectionContextTests.cs (3)
16ConnectionAbortedException ex = null; 18mockConnectionContext.Setup(c => c.Abort(It.IsAny<ConnectionAbortedException>())) 19.Callback<ConnectionAbortedException>(abortReason => ex = abortReason);
Http1\Http1OutputProducerTests.cs (1)
127mockConnectionContext.Verify(f => f.Abort(It.IsAny<ConnectionAbortedException>()), Times.Never());
Http3\Http3HttpProtocolFeatureCollectionTests.cs (2)
90void IStreamAbortFeature.AbortRead(long errorCode, ConnectionAbortedException abortReason) 95void IStreamAbortFeature.AbortWrite(long errorCode, ConnectionAbortedException abortReason)
HttpConnectionTests.cs (1)
45.Verify(c => c.Abort(It.Is<ConnectionAbortedException>(ex => ex.Message == CoreStrings.ConnectionTimedBecauseResponseMininumDataRateNotSatisfied)),
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
249public override void Abort(ConnectionAbortedException abortReason)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (11)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (9)
498public ConnectionAbortedException AbortReadException => StreamContext.AbortReadException; 499public ConnectionAbortedException AbortWriteException => StreamContext.AbortWriteException; 639catch (ConnectionAbortedException) 1045public override void Abort(ConnectionAbortedException abortReason) 1176public ConnectionAbortedException AbortReadException { get; private set; } 1177public ConnectionAbortedException AbortWriteException { get; private set; } 1214public override void Abort(ConnectionAbortedException abortReason) 1273void IStreamAbortFeature.AbortRead(long errorCode, ConnectionAbortedException abortReason) 1278void IStreamAbortFeature.AbortWrite(long errorCode, ConnectionAbortedException abortReason)
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
249public override void Abort(ConnectionAbortedException abortReason)
src\Servers\Kestrel\shared\TransportConnection.cs (1)
70public override void Abort(ConnectionAbortedException abortReason)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (3)
Internal\NamedPipeConnection.cs (2)
16private static readonly ConnectionAbortedException SendGracefullyCompletedException = new ConnectionAbortedException("The named pipe transport's send loop completed gracefully."); 271public override void Abort(ConnectionAbortedException abortReason)
src\Servers\Kestrel\shared\TransportConnection.cs (1)
70public 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\Servers\Kestrel\shared\TransportConnection.cs (1)
70public override void Abort(ConnectionAbortedException abortReason)
src\Servers\Kestrel\shared\TransportMultiplexedConnection.cs (1)
57public override void Abort(ConnectionAbortedException abortReason)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
QuicStreamContextTests.cs (1)
526var serverEx = await Assert.ThrowsAsync<ConnectionAbortedException>(() => serverReadTask).DefaultTimeout();
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (2)
Internal\SocketConnection.cs (1)
91public override void Abort(ConnectionAbortedException abortReason)
src\Servers\Kestrel\shared\TransportConnection.cs (1)
70public override void Abort(ConnectionAbortedException abortReason)
Microsoft.AspNetCore.SignalR.Client.Tests (1)
HubConnectionTests.Reconnect.cs (1)
1184public override void Abort(ConnectionAbortedException abortReason) => _inner.Abort(abortReason);
Microsoft.AspNetCore.WebSockets.Tests (3)
WebSocketMiddlewareTests.cs (3)
537catch (ConnectionAbortedException ex) 550Assert.IsType<ConnectionAbortedException>(receiveException); 843Assert.True(ex is ConnectionAbortedException or WebSocketException, ex.GetType().FullName);