I'm struggling with the problem in title for already couple of days with no success. I have an ASP.NET MVC 3 REST server which requires basic authentication. I want to write JS API accessing this server in AJAX way using XMLHHttpRequest.
For response to any http request including AJAX ones server adds "Set-Cookie: ASP.NET_SessionId=<session id here>; path=/; HttpOnly"
header - that's ok. But it seems that Set-Cookie header is not processed by browser in any way - so even if I do next request with the same XMLHttpRequest object the cookie is not set properly and I can't maintain the session. What I might be doing wrong?
My script has been tested in Firefox 6 and Safari 5 and I have the same problem happening in both browsers.