我用 asp.net core 2.0 编写了一个站点,有时会出现错误引发(很少)。
发生了未处理的异常:指定的参数超出了有效值的范围。参数名称:计数
堆栈跟踪:
System.ArgumentOutOfRangeException:指定的参数超出了有效值的范围。参数名称:Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.GetResult(ReadResult& result) 处的 Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.PipeCompletion.ThrowFailed() 处的计数在 Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.IReadableBufferAwaiter.GetResult() 在 Microsoft.AspNetCore.Server.Kestrel.Internal Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody.d__24.MoveNext() 处的 .System.IO.Pipelines.ReadableBufferAwaitable.GetResult() --- 堆栈跟踪从上一个引发异常的位置结束--- - 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo。
1.<ProcessRequestsAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame
1.d__2.MoveNext()
我不确定,但这个错误可能是在我迁移到 asp.net core 2.0 之后。