Suggest RequestContext add an IServiceProvider property, so easy to control
Suggest RequestContext add an IServiceProvider property, so easy to control
Suggest RequestContext and AspNet HttpContext can make an object, and then access (HttpContextAccessor) accessor.
I don't understand the HttpContext part. Can't serialize and pass it to another machine (silo host), can we?
Can I know what's the use case of adding IServiceProvider to RequestContext? What do you intend to do with it?
@sergeybykov @xiazen I recently custom an authorization module passed through the RequestContext JWT Token in the authorization module need to pass IServiceProvider into it, if RequestContext IServiceProvider then there is no need to pass
@aqa510415008 any place where you might need IServiceProvider, you can inject it - unless there's something which we are not yet constructing using dependency injection. Where in your code do you need the IServiceProvider?
Could you paste some code to demonstrate?
I have successfully used JWT tokens in the RequestContext in past projects without IServiceProvider
@ReubenBond I just use this method to solve, RequestContext IServiceProvider more friendly.
RequestContext is for transferring metadata along with a request only (providing context to a request), not for acting as a Service Locator