How to use HttpContext.Current on asynchronous threads?
Posted
by Eran Betzalel
on Stack Overflow
See other posts from Stack Overflow
or by Eran Betzalel
Published on 2010-05-30T15:25:38Z
Indexed on
2010/05/30
15:32 UTC
Read the original article
Hit count: 860
I've a schedule tasks mechanism (very similar to DotNetNuke's) in my business logic library (a DLL that is used by ASP.Net website). When I use HttpContext.Current
inside on of these tasks, it returns with a null value, because the current async thread (or task) was not initiated from a user's request.
How can I use HttpContext.Current
in these asynchronous threads?
P.S - I think my question is more best-practices related than technical.
© Stack Overflow or respective owner