72 references to ConnectionAbortedException
InMemory.FunctionalTests (1)
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 (2)
ConnectionContext.cs (1)
35public override void Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via ConnectionContext.Abort()."));
Exceptions\ConnectionAbortedException.cs (1)
17this("The connection was aborted")
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.IHttpRequestLifetimeFeature.cs (1)
51Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication));
Microsoft.AspNetCore.Server.Kestrel.Core (53)
Internal\Http\Http1Connection.cs (3)
103_http1Output.Abort(ServerOptions.FinOnError ? new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient) : null!, ConnectionEndReason.TransportCompleted); 109_http1Output.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient), ConnectionEndReason.TransportCompleted); 126Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication), ConnectionEndReason.AbortedByApp);
Internal\Http2\Http2Connection.cs (4)
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); 1322Abort(new ConnectionAbortedException(CoreStrings.Http2ConnectionFaulted), Http2ErrorCode.ENHANCE_YOUR_CALM, ConnectionEndReason.StreamResetLimitExceeded);
Internal\Http2\Http2FrameWriter.cs (2)
170var ex = new ConnectionAbortedException("HTTP/2 connection exceeded the output operations maximum queue size."); 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)
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 (11)
143_multiplexedContext.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByClient)); 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)); 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\Http3OutputProducer.cs (1)
117_stream.Abort(new ConnectionAbortedException($"{nameof(Http3OutputProducer)}.{nameof(ProcessDataWrites)} has completed."), Http3ErrorCode.InternalError);
Internal\Http3\Http3Stream.cs (11)
195var abortReason = new ConnectionAbortedException(CoreStrings.Http3StreamErrorAfterHeaders); 557_streamAbortFeature.AbortRead((long)Http3ErrorCode.NoError, new ConnectionAbortedException("The application completed without reading the entire request body.")); 935protected override void ApplicationAbort() => ApplicationAbort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedByApplication), Http3ErrorCode.InternalError); 1006Abort(new ConnectionAbortedException(CoreStrings.Http3ErrorConnectMustNotSendSchemeOrPath), Http3ErrorCode.ProtocolError); 1026Abort(new ConnectionAbortedException(str), Http3ErrorCode.ProtocolError); 1057Abort(new ConnectionAbortedException(CoreStrings.BadRequest_RequestLineTooLong), Http3ErrorCode.RequestRejected); 1077Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3ErrorMethodInvalid(_methodText)), Http3ErrorCode.ProtocolError); 1085Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3ErrorMethodInvalid(_methodText)), Http3ErrorCode.ProtocolError); 1125Abort(new ConnectionAbortedException(CoreStrings.FormatBadRequest_InvalidHostHeader_Detail(hostText)), Http3ErrorCode.ProtocolError); 1138Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3StreamErrorPathInvalid(RawTarget)), Http3ErrorCode.ProtocolError); 1177Abort(new ConnectionAbortedException(CoreStrings.FormatHttp3StreamErrorPathInvalid(RawTarget)), Http3ErrorCode.ProtocolError);
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\TransportConnectionManager.cs (1)
85connection.TransportConnection.Abort(new ConnectionAbortedException(CoreStrings.ConnectionAbortedDuringServerShutdown));
Internal\WebTransport\WebTransportSession.cs (2)
113stream.Value.Abort(new ConnectionAbortedException(exception.Message)); 162stream.Abort(new ConnectionAbortedException(CoreStrings.WebTransportFailedToAddStreamToPendingQueue));
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
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 (4)
Internal\QuicConnectionContext.cs (1)
73public override void Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via MultiplexedConnectionContext.Abort()."));
Internal\QuicStreamContext.cs (1)
18private static readonly ConnectionAbortedException SendGracefullyCompletedException = new ConnectionAbortedException("The QUIC 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()."));
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 (6)
QuicConnectionContextTests.cs (3)
340serverStream.Abort(new ConnectionAbortedException("Test message")); 390serverStream.Abort(new ConnectionAbortedException("Test message")); 480serverStream.Abort(new ConnectionAbortedException("Test message."));
QuicStreamContextTests.cs (3)
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"));
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()."));