How to solve the problem that the scheduled task executed by Hangfire cannot obtain the http context of the original request, and some interfaces assigned according to the http context cannot obtain the value in the method executed by Hangfire
You should capture the values you need from the HttpContext in an object and use it as a parameter when scheduling the Hangfire task. HttpContext is never accessible outside of the original request.
How to solve the problem that the scheduled task executed by Hangfire cannot obtain the http context of the original request, and some interfaces assigned according to the http context cannot obtain the value in the method executed by Hangfire