views:

26

answers:

2

I would like to make a periodic background request from JavaScript on the client to my web application (ASP.NET, IIS 7), but I don't want the request to affect the ASP.NET session timeout.

Is there a way to do this?

A: 

You have to avoid sending cookies with your request because that's how session ids are transmitted.

If you have an xmlHTTPRequest object, you can remove your cookie header by calling xmlHTTPRequest.setRequestHeader("Cookie", "");

BC
A: 

If I execute the above code (in the beforeSend event of the JQuery $.ajax() method I'm using to send the request), the request fails. :-(

Mark Kimmerly