Client-side session timeout redirect in ASP.Net -


I want to make a way to automatically redirect users to Timepoints aspx when my session expires due to inactivity. I am My application uses form authentication and relies heavily on the update panel within the same aspx page for user encoding, so I do not want to redirect only after the end of a page-level timer is over. For the same reason, I would say '& lt; Meta http-equiv = "refresh" />

Can not use ISessionTimedOut is making a simple Ajax Web service with a method called), which just gives a boolean, I use a Javascript timer to call the method from time to time And if this is true, then redirect to the timeout aspx. However, I do not want to call this method to reset the session timeout timer, or the service call will never end the session. Is there a clear way to avoid this catch -22? Hopefully this is an easy solution that has not left me so far. The root cause of the problem is that the AJAX app, to provide a robust user experience, allows you to set up your client scripts. Be aware of the code ream and check the status of each call, and on determining whether the failure is due to a stale session / ticket. With an active approach your client script can be dramatically simplified, while at the same time a better user experience can be provided.

I have made a special solution to this problem.

Bumping this interactive session and ticket ticket lifetime without sessions or tickets.

Multiple browsers / tabs are not a problem.

Forget sunscreen; Remember: While doing Ajax, stay active - you should leave one session, one session should not leave you; -)


Comments