-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
Description
I have a particular configuration (i.e., hosting OWIN in plain vanilla asp.net application in IIS) that requires me to "inject" ILifetimeScope from outside OWIN middleware instead of creating it inside. So what I want to have is:
- asp.net's
Application_BeginRequestcreates a per-request lifetime scope and saves it toHttpRequestproperties - OWIN injector middleware, instead of creating its own lifetime scope, calls external "factory", which simply extracts lifetime scope from
HttpRequestproperties - further OWIN pipeline proceeds as before
- because lifetime scope was created externally, OWIN injector middleware does not dispose it
- asp.net's
Application_EndRequestgets lifetime scope fromHttpRequestproperties and disposes it
Is this a feasible approach? I can provide a create a pull-request for this quite quickly and I don't think this would be a breaking change.