title: internet explorer ashx file problem
body: <p>My problem is a bit complicated:
  I am writing in c#, asp.net and using jquery</p>
  
  <ol>
  <li>I have a page that sends requests to
  the server using jquery's ajax
  method.</li>
  <li>I have a ashx file (handler) to
  respond to these request.</li>
  <li>User can perform several changes on
  several pages, then use some method
  that will call the ajax method.</li>
  <li>My ashx file reads some values From the
  session variables and acts
  accordingly.</li>
  </ol>
  
  <p>This works fine in all browsers but in internet explorer.
  In internet explorer the session seems to hold old information (old user ids'). It's incredible, the same code works fine in firefox, chrome and safari but fails with ie.</p>
  
  <p>What could be causing it? I have no clue where to even start looking for a solution.</p>
  
  <p>btw, Sorry for the general title, couldn't figure out how to explain in just few words.</p>
  
  <p>Here are the jquery code and the ashx:</p>
  
  <p><strong>jquery</strong></p>
  
  <pre><code>function SendRequstToServer(actionId, additional, callback) {
      if (actionId == "-1") {
          document.location = "default.aspx";
      }
      $.ajax({ url: "SmallRoutinesHandler.ashx", method: "GET",
      //asyn: false,
          data: "Action=" + actionId + additional,
          contentType: "string",
          error: function(xhr, status, errorThrown) {
              alert(errorThrown + '\n' + status + '\n' + xhr.statusText);
          },
          success: function(data) {
              alert(data);
              callback(data);
          }
      });
  }
  </code></pre>
  
  <p><strong>Ashx</strong></p>
  
  <pre><code>context.Response.ContentType = "text/plain";
  action = context.Request.QueryString["Action"];
  switch ((ClientSideActionsRequest)Enum.Parse(typeof(ClientSideActionsRequest), action))
  {
      case ClientSideActionsRequest.ShowProducts:
      long userId = WebCommon.CurrentlyWatchedUser.Id;
      List&lt;UserItems&gt; userItems = UserItems.GetByUserId(userId);
      string[] items = HtmlWrapper.WrapAsItems(userItems);
      if (items.Length &gt; 0)
      {
           context.Response.Write(items.Aggregate((current, next) =&gt; string.Format("{0} , {1}", current, next)));
      }
      break;
  }
  </code></pre>
  
  <p>Thank You!</p>