title: Is it correct to assign HttpContext.Current inside a task factory?
body: <p>I was getting HttpContext.Current as null inside the method which is called inside a task factory. So I assigned the HttpContext.Current to currentContext variable. Then I used the same variable to assign HttpContext.Current.</p>
  
  <pre><code>    var currentContext = HttpContext.Current;
      Task shipmentCreationCompleted = Task.Factory.StartNew(() =&gt;
      {
          HttpContext.Current = currentContext;
          MethodToPerformSomeAction();
      });
  </code></pre>
  
  <p>It is now working fine without any problem. Please let me know if my code has any problem technically. Or is there any alternate way to handle this problem?</p>