title: HttpContext becomes NULL in Tasks
body: <p>I create extension method for HttpContext. This method generates pdf files.</p>
  
  <pre><code>public static Task GeneratePdfTask(this HttpContext context, string path, int submissionId, string pdfName, Action&lt;int, byte[]&gt; postAction = null)
      {
          var local = context;
          return Task.Factory.StartNew(() =&gt;
          {
              HttpContext.Current = local;
              SessionHelper.Set(SessionKey.IsPdfRendering, true);
              var pdfFile = new PdfGenerator().Generate(path, pdfName, submissionId);
              if (postAction != null &amp;&amp; pdfFile != null)
              {
                  postAction(submissionId, pdfFile);
              }
          });
      }
  </code></pre>
  
  <p>Sometimes this Session (<code>HttpContext.Current</code>) become NULL and i get exception. But don't know why. Is there some restriction of creating extensions for Session? Maybe there are some another solution how to safely use current Session?</p>