-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ObjectDisposedException: Request has finished and HttpContext disposed. in Extensions.Http.AspNetCore #2417
Comments
Can you share what you have and what you're currently doing? Even if it's random it would be helpful to have some steps that could help us figure out what is causing this. |
csproj file:
Trimmed down function raising object desposed function:
Behind the scenes some other api's are being called. They can be slow, but we could not correlate duration vs ObjectDisposedexception. |
Hi , I got the similar exception,
when we can expect the issue fix ? and is there any short term solution or workaround for this issue |
@Rihab8 We removed the dependencies to Asp.net, depending on your functions this is a viable solution or not. |
Description
When using the Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore version 1.2.1 we sometimes receive an ObjectDisposedException resulting in a System.InvalidOperationException: An attempt was made to transition a task to a final state when it had already completed.
Here is the stack trace of the ObjectDisposedException
This file hase already been changed, so line numbers are wrong. https://github.com/Azure/azure-functions-dotnet-worker/pull/2322/files/6149e16e951188e97bf7fcff6918b45ae233bde4#diff-dc49550c24c24c88566ae78776b0400d415dfc8d1a5d623571903671a953e715
The GetRouteData call in now on line 72 instead of 54.
We don't have a reproducible sample as this exception did only happens seemingly random.
As a quick fix we removed AspNetCore package from our function.
Steps to reproduce
Only saw it on a deployed linux azure function with a single instance.
The text was updated successfully, but these errors were encountered: