I have an ASP.NET web application I’m running with VS2010 that has session timeout configured for 20 minutes.
I leave a page running that does an ajax call every 2 minutes and has a defibrillator implemented. With this setup, the session should never expire; and yet I find that 20 minutes later my session is still ending.
Does anybody know why that happens? And more importantly, can anybody tell me how to make sure the session never expires when the user is in that page?
EDIT: I changed the defibrillator so it now executes this code in javascript:
setTimeout("location.href = '/Defibrillator.aspx?nocache=" + Math.floor(Math.random()*100000000001) + "';",60000);
Still the same, so it’s not a cache issue.
I’m running the site from VS directly (via the Debug “play” button), so it shouldn’t be sharing an Application Pool, right?
In the end I had to resort to adding an autosave feature using ajax.
It’s a sad day when StackOverflow can’t give me an answer 🙁
EDIT: I finally found out what was causing the problem… it turned out that in some place in the masterpage the code was calling a rather obscure method that enforced a fixed timeout… so it wasn’t anything that you could have helped me with. Sorry about that.