-
Notifications
You must be signed in to change notification settings - Fork 455
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
No Scope available on non-versioned controllers #596
Comments
HI @twenzel For your code:
|
Hi Guys, I'm experiencing the same issue as @twenzel . I have a POST request, then my code calls Container.BeginScope(). If, in the non api versioned controller, I wrap my code in using(var scope = HttpContext.RequestServices.CreateScope()), then everything works fine. Do you have any suggestion? Best regards |
i am wondering why do you need to manually call |
@ltines , our old implementation was calling What is the piece of the pipeline you are referring when you say 'The pipeline should start scope via CreateScope automatically' ? |
Given:
ASP.NET Core 5 API App using Windsor
When using Microsoft API versioning (Startup.cs line 29) the controller is only working when the request is using the versioned url "/api/v1/weatherforecast". When using the non-versioned url "/weatherforecast" services resolved inplace creates a InvalidOperationException "No Scope available"
This was working with ASP.NET Core 2.2.
AspCoreVersionedApis.zip
The text was updated successfully, but these errors were encountered: