Context Accessor Interface
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.