473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

What factor determine a session to end?

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

Nov 17 '05 #1
2 3320
20 minutes later.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big things are made up of
lots of little things.

"Kian Goh" <ki************@hotmail.com> wrote in message
news:OG*************@TK2MSFTNGP11.phx.gbl...
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

Nov 17 '05 #2
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.a...=1&PostID=7504

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Kian Goh" <ki************@hotmail.com> wrote in message
news:OG*************@TK2MSFTNGP11.phx.gbl...
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

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ravi Tallury | last post by:
Hi We are having issues with our application, certain portions of it stop responding while the rest of the application is fine. I am attaching the Java Core dump. If someone can let me know what...
0
by: Keith | last post by:
First I would question why you want to do this. If they get to the page by any means it should respond appropriately, whether refresh or by link. This is a stateless environment after all. That...
4
by: Gary Davis | last post by:
Once a day or so, I receive an error on a fairly active website that calls this StrMixed.cs method constructor. 99% of the time there is no exception: System.Web.HttpUnhandledException:...
3
by: David | last post by:
Hi, I write asp.net via c#. How should I know the client's session alive? 1. if ( Session.Equals ( null ) ) 2. if ( Convert.IsDBNull(Session) ) 3. if ( Session.Contents.Count == 0 ) Thanks...
2
by: Martin Høst Normark | last post by:
Hi everyone Has anyone got the least experience in integrating the Digital Signature with an ASP.NET Web Application? Here in Denmark, as I supose in many other countries, they're promoting...
3
by: Rod | last post by:
In Dino Esposito's book, "Programming Microsoft ASP.NET", there is a chapter titled, "ASP.NET State Management". There is a section in there discussing session state sometimes going away. He...
3
by: Shapper | last post by:
Hello, How to determine if a Session Variable exists? In Page_Load I need to check is Session("MyVar") Exists. If it doesn't exist then I created it and give it a value: Session("myVar") =...
0
by: Brett Smith | last post by:
I have a winforms app that access a web resource using forms authentication. I programatically login to the site, and catch the cookies. I then pass the cookies to my httpwebrequest. I neet to...
5
by: Benedictum | last post by:
I need to implement an option to display on the web page for users currently logged in. How do I implement this in ASP.NET (c#). I could probably have a boolean field in the database where a user...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.