title: What sessionid/cookie information does asmx expect in the header?
body: <p>I'm saving http header cookie/sessionid information when calling a login webmethod so I can send it back on subsequent webmethod calls secured by formsauthentication. I think I just need to know the proper header values to save so and send them back.</p>
  
  <p>I'm calling these services from an android app using ksoap2.</p>
  
  <p>When I step through the code when calling login. I see <strong>two</strong> <code>Set-Cookie</code> header items:</p>
  
  <pre><code>Set-Cookie
  ASP.NET_SessionId=wblzzrtfmli4blku2dslw5iw; path=/; HttpOnly
  
  Set-Cookie
  .ASPXAUTH=8264E023428DA853BB163504C0D375D792FC631BB873F04D196E04BAEDE7F7BB39BB5C840D0CD0613A0DD58B2456F12EE21F212D93457F3D6BC2FC343C6AE1E3DD97473B055B36379D178FE6C412EFF61CFCE7FACAF43EEAE85C46B5123CB97C3AFF156F54921993F4A2B85BEE239EAFB05AFFF58FBDA3B7EBDC59B5E0A614D8CC086B5C7DF3A884DE95DBE05F6A138DB97241666870AAF9320EDD; path=/; HttpOnly
  </code></pre>
  
  <p>As I understand from the <a href="http://code.google.com/p/ksoap2-android/wiki/Cookies" rel="nofollow noreferrer">documentation here</a> and the <a href="https://stackoverflow.com/a/6408988/442580">answer here</a>, I have to return the <code>Set-Cookie</code> value to the subsequent webmethods using <code>Cookie</code>. But as you can see above I'm getting <strong>TWO Set-Cookie</strong> header items. So which one do I send back and can I send them back as-is or do I need to strip out the <code>.ASPXAUTH=</code> portion or anything else?</p>