0
votes

I am using Asp.Net sessionState timeout property set to 60. Does that mean that the session will timeout after 60 minutes irrespective of whether user is idle or not or does it not expire when user has not requested anything from server for 60 minutes?

http://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.timeout%28v=vs.110%29.aspx

If it expires irrespective of whether user is using the app or not, how do I make it so it only expires when it is idle?

2
First line in your link (emphasis mine): Gets and sets the amount of time, in minutes, allowed between requests before the session-state provider terminates the session. So, sessions will only expire when idle. - Frédéric Hamidi
Thanks. Does that mean only if it's idle. Right? - Jack

2 Answers

2
votes

It is clearly explained in MSDN

Gets and sets the amount of time, in minutes, allowed between requests before the session-state provider terminates the session.

If a user does not make any request for 60 minutes the Session will expire

0
votes

No, SessionTimeout doesn't work that way.

In your case, since you have set the timeout to 60 minutes, it actually means that

Session will not expire until some user doesn't make any request for the whole 60 minutes.

In your words(since you keep on talking about "idle" !):

Session will expire if a user is idle for 60 minutes without making a single request.

That's the simple explanation I could give you ;)