HttpContextCurrent
HttpContextCurrent is an informal reference to accessing the per-request HTTP context within a web application. In the classic .NET Framework model, this is commonly exposed via the static property HttpContext.Current, which represents the HttpContext for the active HTTP request. The concept is the same: a per-request container that aggregates information such as the Request, Response, Session, Items, and User data.
In ASP.NET classic and Web Forms or MVC applications, HttpContext (and its Current property) is created for
HttpContextCurrent (or HttpContext.Current) can be null when accessed outside the context of an HTTP request, such
In ASP.NET Core, HttpContext.Current does not exist. The preferred approach is to inject IHttpContextAccessor and use