473,412 Members | 2,262 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,412 software developers and data experts.

Session End Guarantee?

Howdy,

is the Session_End event a guarantee event to be fired? I have this memory
of back in ASP and IIS 4 that the event was guaranteed, like a 50/50 chance.
If I have some shopping cart clean up functions in the Session_End event,
will that fire every single time a user's session expires whether from
closing the browser window, browsing to another site or programatically
abandoning a session? Or is there a better way?

Thanks,

Merry Christmas
David Lozzi
Dec 8 '06 #1
5 3821
"David Lozzi" <dl****@nospam.nospamwrote in message
news:OL**************@TK2MSFTNGP03.phx.gbl...
is the Session_End event a guarantee event to be fired?
Yes, unless you're using SQL Server for your session management.
If I have some shopping cart clean up functions in the Session_End event,
will that fire every single time a user's session expires whether from
closing the browser window, browsing to another site or programatically
abandoning a session?
Closing the browser window, or browsing to another site will NOT cause
Session_End to fire, at least, not straightaway - the server has absolutely
no way of knowing what happens on the client machine until it gets another
HttpRequest from it. In this instance, Session_End will fire when the
session times out naturally.
Dec 8 '06 #2
No. it only fires for inproc sessions, and if there is no recycle (which
force a kill process).

-- bruce (sqlwork.com)

David Lozzi wrote:
Howdy,

is the Session_End event a guarantee event to be fired? I have this memory
of back in ASP and IIS 4 that the event was guaranteed, like a 50/50 chance.
If I have some shopping cart clean up functions in the Session_End event,
will that fire every single time a user's session expires whether from
closing the browser window, browsing to another site or programatically
abandoning a session? Or is there a better way?

Thanks,

Merry Christmas
David Lozzi

Dec 8 '06 #3
OK, So I'm not using SQL for the session state, instead just inproc. So
after 20 minutes it'll expire and fire the event?

Thanks,
David Lozzi

"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:ui**************@TK2MSFTNGP03.phx.gbl...
"David Lozzi" <dl****@nospam.nospamwrote in message
news:OL**************@TK2MSFTNGP03.phx.gbl...
>is the Session_End event a guarantee event to be fired?

Yes, unless you're using SQL Server for your session management.
>If I have some shopping cart clean up functions in the Session_End event,
will that fire every single time a user's session expires whether from
closing the browser window, browsing to another site or programatically
abandoning a session?

Closing the browser window, or browsing to another site will NOT cause
Session_End to fire, at least, not straightaway - the server has
absolutely no way of knowing what happens on the client machine until it
gets another HttpRequest from it. In this instance, Session_End will fire
when the session times out naturally.

Dec 11 '06 #4
re:
after 20 minutes it'll expire and fire the event?
If you have 20 minutes set as your session timeout, yes, if the ASP.NET
application hasn't been restarted by automatic app recycling.

If the app has been recycled, Session_End will not fire.
The app will simply be shut down and be restarted.

Otherwise, at the end of whatever number of minutes you have set for the timeout.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
"David Lozzi" <dl****@nospam.nospamwrote in message news:OV**************@TK2MSFTNGP04.phx.gbl...
OK, So I'm not using SQL for the session state, instead just inproc. So after 20 minutes it'll
expire and fire the event?

Thanks,
David Lozzi

"Mark Rae" <ma**@markNOSPAMrae.comwrote in message news:ui**************@TK2MSFTNGP03.phx.gbl...
>"David Lozzi" <dl****@nospam.nospamwrote in message
news:OL**************@TK2MSFTNGP03.phx.gbl...
>>is the Session_End event a guarantee event to be fired?

Yes, unless you're using SQL Server for your session management.
>>If I have some shopping cart clean up functions in the Session_End event, will that fire every
single time a user's session expires whether from closing the browser window, browsing to
another site or programatically abandoning a session?

Closing the browser window, or browsing to another site will NOT cause Session_End to fire, at
least, not straightaway - the server has absolutely no way of knowing what happens on the client
machine until it gets another HttpRequest from it. In this instance, Session_End will fire when
the session times out naturally.


Dec 11 '06 #5
"David Lozzi" <dl****@nospam.nospamwrote in message
news:OV**************@TK2MSFTNGP04.phx.gbl...
OK, So I'm not using SQL for the session state, instead just inproc. So
after 20 minutes it'll expire and fire the event?
Yes, assuming:

1) that the default Session.Timeout of 20 minutes has not been changed.

2) that your app hasn't been recycled

3) obviously, that your server hasn't crashed or been subject to some other
unplanned shutdown... :-)
Dec 11 '06 #6

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

Similar topics

3
by: Kevin | last post by:
I just installed WinXP Pro SP1. I installed IIS 5.1. I have a project that was created in VB6 using webclasses (yuck!). It will not run. Here is the problem: If I do this: Set...
4
by: A Web Master | last post by:
I am designing a site for a client where I have a frameset and 3 frames (all in ASP). I am creating session variables in the frameset that need to be accessed in the frames. It seams that in...
6
by: Brian Brinks | last post by:
I am having some trouble with seesion variables. I have just moved hosting companies to Brinkster.com but have been having problems with my applications holding session. They say they can't...
3
by: Nhi Lam | last post by:
Hi, I understand that there are 3 modes in which I can configure the SessionStateModule. What I need is an out of process Session State store with fail over support. The "SQL Server Mode" seems...
3
by: Uwe | last post by:
Howdy! I've googled and googled for this without success, and either it's so easy that nobody has ever asked, or there is some serious reason nobody would do this. But I'm going to ask anyway....
2
by: Colin Basterfield | last post by:
Hi, I am confused... I have the following code in my Page_Load method private void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here
15
by: SFX | last post by:
If I have a session ID (string) can I somehow obtain the session object associated to that ID (it exist of course) ? I know this sounds wicked but I have a situation in which I have to make a...
3
by: Ned Balzer | last post by:
Hi all, I posted this question some time ago in an earlier thread but so far I still don't have an understanding of why this is happening or what I can do to fix it. I use Session variables,...
43
by: davidkoree | last post by:
I mean not about cookie. Does it have something to do with operating system or browser plugin? I appreciate any help.
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.