title: Session losing between multiple ajax posts
body: <p>I have a page where on entering text in a textbox I do an ajax post and get data, display on the page and perform some calculations (using jquery). There is an asp button (Save). On click of Save, I again do an ajax post and pass values and create Session variables. For both the ajax posts, the value of async is set to false. The OnClick button of Save uses the session variables created in ajax posts. 
  However in some cases, my session times out automatically and I am redirected to login page.</p>
  
  <p>There is no cross domain ajax post. This is in the same application (same page).</p>
  
  <p>I have tried the following:</p>
  
  <ol>
  <li>Added - xhrFields: { withCredentials: true },</li>
  <li>Added - crossDomain: true,</li>
  <li>Added - HttpContext.Current.Request.Headers.Add("Access-Control-Allow-Origin", "*");
  HttpContext.Current.Request.Headers.Add("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
  HttpContext.Current.Request.Headers.Add("Access-Control-Max-Age", "3600");</li>
  </ol>
  
  <p>Can someone help me identify what am I doing wrong.</p>