Skip to content
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

UseBranchWithServices leaves the HttpContext with a disposed service provider when the scope finishes #176

Open
DJackman123 opened this issue May 24, 2019 · 0 comments

Comments

@DJackman123
Copy link

When the scope is created in UseBranchWithServices, it changes the context.RequestServices service provider to be the scope's service provider instead then proceeds with the rest of the pipeline. This is fine, but when the scope is done that service provider is disposed and any middleware in the pipeline before the branch will be stuck with a context whose RequestServices is disposed. The code in UseBranchWithServices should restore the old service provider on the way out so this doesn't happen.

DJackman123 pushed a commit to DJackman123/WebAPIContrib.Core that referenced this issue May 24, 2019
…to the HttpContext after the branch scope is finished.
filipw added a commit that referenced this issue May 24, 2019
…cope

Fix issue #176.  Old service provider should be restored to the HttpC…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant