1

We have an windows Azure web role (typically ASP.NET application) with client side J-queries that handles the UI operations. We need to timeout the session if it is not used for 20 minutes and redirect to Login page after that.

Now the problem is

there are very few pages with aspx.cs code behind code written. We have called the Session expire script there. Most of the request goes to handler classes from Jquery. Because of this the client side activities are not being considered for extending session time out and after 20 minutes of the page load (where we have injected session expire scripts), it gets timed out and redirects to Login. This is not a good end user experience and we would like to resolve this. How can we extend the session time out during client side code execution?

Community
  • 1
  • 1
Chani
  • 5,055
  • 15
  • 57
  • 92

1 Answers1

0

If most of the requests are going to handlers, and not to regular pages, I think you can solve your issue with requiring a Session for the Handlers (check this question for how to enable Session State for handlers).

You just need to do that in order to fire the session state to be refreshed on every handler request, so it won't expire. A regular handler would not trigger the session engine, so it counts as inactivity of user.

Community
  • 1
  • 1
astaykov
  • 30,768
  • 3
  • 70
  • 86