unosquare / embedio

A tiny, cross-platform, module based web server for .NET
http://unosquare.github.io/embedio
Other
1.46k stars 176 forks source link

HttpContext to register controllers #488

Closed wbarrionuevo closed 4 years ago

wbarrionuevo commented 4 years ago

Hello,

I'm trying to add a per-request DI scope (Autofac) to my web server. I need access to the HttpContext at the moment I'm registering the controller factory, just so I can store the scope in IHttpContext.Items and retrieve/dispose it by the end of the request. Is there any way to achieve such thing?