Accessing HttpContext outside of framework components in ASP.NET Core

added by DotNetKicks
12/13/2016 2:09:17 PM

2 Kicks, 438 Views

When developing web applications with ASP.NET, it is common to end up in situations where you require access to . This wouldn't be anything special, but outside of the context of framework level APIs such as controllers, middleware and so on (which would always give you a way to fetch the current HttpContext), it can be tricky.