Closed abatishchev closed 2 years ago
Here's an alternative stack trace for HttpListenerRequest
:
Object name: 'System.Net.HttpListenerRequest'.
at System.Net.HttpListenerRequest.CheckDisposed()
at System.Net.HttpListenerRequest.get_LocalEndPoint()
at System.Net.HttpListenerRequest.get_IsLocal()
at Microsoft.Owin.Host.HttpListener.RequestProcessing.OwinHttpListenerContext.GetServerIsLocal()
at Microsoft.Owin.Host.HttpListener.RequestProcessing.CallEnvironment.get_ServerIsLocal()
at Microsoft.Owin.Host.HttpListener.RequestProcessing.CallEnvironment.PropertiesTryGetValue(String key, Object& value)
at Microsoft.Owin.Host.HttpListener.RequestProcessing.CallEnvironment.TryGetValue(String key, Object& value)
at Microsoft.Owin.OwinContext.Get[T](String key)
at System.Web.Http.Owin.OwinHttpRequestContext.get_IsLocal()
at System.Web.Http.Owin.OwinHttpRequestContext.get_IncludeErrorDetail()
at System.Web.Http.ExceptionHandling.LastChanceExceptionHandler.CreateDefaultLastChanceResult(ExceptionContext context)
at System.Web.Http.ExceptionHandling.LastChanceExceptionHandler.HandleAsync(ExceptionHandlerContext context, CancellationToken cancellationToken)
at System.Web.Http.ExceptionHandling.ExceptionHandlerExtensions.<HandleAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.HttpServer.<SendAsync>d__24.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.Owin.HttpMessageHandlerAdapter.<InvokeCore>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AAD.Throttling.GatewayService.Middleware.UpdateResponseHeaders.UpdateResponseHeadersMiddleware.<Invoke>d__2.MoveNext() in C:\source\src\Service\GatewayService\Middleware\UpdateResponseHeaders\UpdateResponseHeadersMiddleware.cs:line 42
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AAD.Throttling.GatewayService.Middleware.Reporting.LoggerMiddleware.<Invoke>d__8.MoveNext() in C:\source\src\Service\GatewayService\Middleware\Reporting\LoggerMiddleware.cs:line 45
And for HttpListenerResponse
:
Object name: 'System.Net.HttpListenerResponse'.
at System.Net.HttpListenerResponse.CheckDisposed()
at System.Net.HttpListenerResponse.set_ContentLength64(Int64 value)
at Microsoft.Owin.Host.HttpListener.RequestProcessing.HeadersDictionaryBase.Set(String key, String[] value)
at Microsoft.Owin.OwinResponse.set_ContentLength(Nullable`1 value)
at Microsoft.Owin.StaticFiles.StaticFileContext.ApplyResponseHeaders(Int32 statusCode)
at Microsoft.Owin.StaticFiles.StaticFileContext.SendAsync()
at Microsoft.Owin.StaticFiles.StaticFileMiddleware.Invoke(IDictionary`2 environment)
at Microsoft.Owin.StaticFiles.DefaultFilesMiddleware.Invoke(IDictionary`2 environment)
at System.Web.Http.Owin.HttpMessageHandlerAdapter.<InvokeCore>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware`1.<Invoke>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AAD.Throttling.GatewayService.Middleware.UpdateResponseHeaders.UpdateResponseHeadersMiddleware.<Invoke>d__2.MoveNext() in C:\source\src\Service\GatewayService\Middleware\UpdateResponseHeaders\UpdateResponseHeadersMiddleware.cs:line 42
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AAD.Throttling.GatewayService.Middleware.Reporting.LoggerMiddleware.<Invoke>d__8.MoveNext() in C:\source\src\Service\GatewayService\Middleware\Reporting\LoggerMiddleware.cs:line 45
This could be related to https://github.com/aspnet/AspNetKatana/issues/430. Can you repro it using the new 4.2.1 release?
We're not using HTTP/2. But I've updated all packages to 4.2.1 and will monitor, see if the number of these exceptions will drop.
Looks like the error is gone after updating to 4.2.1 indeed. Cool!
Great. Does it help with your other three issues as well?
Under certain (unknown) circumstances the following code fails with
ObjectDisposedException
:Stack trace (note
HttpListenerRequest
):and (note
HttpListenerResponse
):Environment:
Packages: