What factor determine a session to end?

K

Kian Goh

Hi there,

Just wonder what factor actually determine a session to end?

What happen a user close the browser or switch to other website? Does the
session end immediately or 20 minutes later? (20 minutes defined in
Web.config)

Thanks,
Kian
 
S

Steve C. Orr, MCSD

The session will time out after 20 minutes of no page requests from the
user.
This default time interval is configurable in your web.config file.
After the session times out the Session_End event will be called in your
Global.asax file.
You can terminate the session manually by calling Session.Abandon, but be
aware this will cause the Session_End event to not be called. But that's
not so bad. Just take your code from the Session_End event, put it in a
separate function, then call that function from both your Session_End event
and whenever you call Session.Abandon.

Here's more details for you:
http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=7504
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top