views:

25

answers:

2

Ok. I can't really solve what I want - so if you can please advise me on how to:

I have a page of each every click has ajax call to my server (hence, the ASP extends the session)

I have ASP.NET session set to Xmin. I want when X+1 min expires, I have expiration page. what I did was to set the JS timer to validate every x+1min to see if the session expired (the problem is that the JS and the ASP session timeouts are not synced)

how can I make them be synced.

thanks alot

A: 

every time you make an ajax call reset your timeout agian. so they will be synced...

guy schaller
A: 

I say that you can not absolute synchronized them because they run on 2 different computer that you can not control the one of them. So is better find other way to do what you try.

Here are similar links.

http://forums.asp.net/p/1207721/3094847.aspx

http://blogs.msdn.com/b/nikhiln/archive/2007/06/21/detecting-session-timeout-in-asp-net-2-0-web-applications.aspx

http://www.codeproject.com/KB/scripting/Session_Timeout.aspx

http://stackoverflow.com/questions/1470407/get-asp-net-session-last-access-time-or-time-to-timeout

Aristos