HttpContext Access in outside of framework another class library services .NET CORE

Issue: We do not have access to HttpContext outside of Controller, Base Controller, and Middleware, But some time we need that in services or another Class library for access Headers or any other thing. So just look at how to achieve it. Add IHttpContextAccessor in Startup.cs file 2. Then simply on which service you would … Read more