Context Accessor Interface
Provides access to the current HttpContext, if one is available.
public interface class IHttpContextAccessor
public interface IHttpContextAccessor
type IHttpContextAccessor = interface
Public Interface IHttpContextAccessor
This interface should be used with caution. It relies on AsyncLocal<T> which can have a negative performance impact on async calls. It also creates a dependency on "ambient state" which can make testing more difficult.