title: Cannot get session in webmethod in asp.net
body: <p>I just find that the problem is not related to the webmethod.</p>
  
  <p>It is caused by another problem.</p>
  
  <p>I set the <code>Session["PhotoId"]</code> in a normal aspx.
  But I can't retrieve value in the <code>webMethod</code> of the aspx page.</p>
  
  <pre><code>[WebMethod(EnableSession=true)]
      public static string Submit(string data1, ...)
      {
          string test = HttpContext.Current.Session["PhotoId"]; // test is null
      }
  </code></pre>
  
  <p>What should I do?</p>