Why is HttpContext.Current null?

Clearly HttpContext.Current is not null only if you access it in a thread that handles incoming requests. That’s why it works “when i use this code in another class of a page”. It won’t work in the scheduling related class because relevant code is not executed on a valid thread, but a background thread, which … Read more