I want to access HttpContext.Current in my asp.net application within
Task.Factory.Start(() =>{ //HttpContext.Current is null here });
As David pointed out, HttpContext.Current will not work all the time. In my case, about 1 of 20 time, CurrentContext will be null. End up with below.
string UserName = Context.User.Identity.Name; System.Threading.Tasks.Task.Factory.StartNew(() => { UserName ... }