You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
I have Scoped lifetime problem with Isolated runtime.
It looks like there are two scoped lifetimes for one http request.
One for the "Middlewares" and one for the "Function".
Here is my code:
Startup.cs
Function1.cs
When i call "http://localhost:7071/api/Function1", then it will log this out:
Its expected that there should be 1 scoped lifetime in one http request, where the "Middleware" and "Function" scopes are both shared.
So this is a bug, correct?
Im using:
It happens both with .NET 7 rc 2 and .NET 6 with the latest versions of the nuget packages and also the preview packages.
Workaround
My workout right now, is to instantiate all services in my middleware through the FunctionContext, and then it will work
Then when i call the api, it will log out:
The text was updated successfully, but these errors were encountered: