Wrox Programmer Forums
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 4th, 2005, 07:06 PM
Authorized User
Join Date: Dec 2004
Posts: 67
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ALEX_GRIM

awwww, did i hurt your little feelings? too bad i don't care.
you see, unlike you, i'm not still whinning about our little disagreement, as a matter of fact, i don't even remember what the hell you don't like me for (lmmfao, not that i care).

but yes, i AM a smart ass, and i'm also an assh*le, a bast*rd etc. but i don't care about what people think, so it doesn't matter to me.

to be honest, i think your mad because someone who has only been teaching himself programming for about 2 months has proven you wrong about something.
you need to realize something matt, i LOVE to argue (especially when i'm right), so you won't win with me.

-GRIM is your freind

A Black sheep moves easy in the darkness.
Old June 13th, 2005, 01:57 PM
Registered User
Join Date: Jun 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

Alex, you just don't comply with standard norms of expected behavior for these forums. This is primarily a support forum, not an argument forum. If you want to argue, you should find another forum that supports what you like to do.

Also, FYI, on almost 99% of web text based communication, capital letters are considered shouting. Apparently you understand that norm now since you've switched how you type, but why you didn't know that is pretty perplexing.

I think there needs to be clarification, and that is that you can't expect Session_OnEnd to fire when you want it to, not that it never will fire. I don't see anything on the internet saying that it won't fire, and like Alex I'm confused about why the two developers prior were saying it won't fire. What I do see is that there is a 20 minute default, and since 20 minutes is a long time in web programming, it just feels like it never fires. If you do what Alex says and reduce the time through whatever system property adjusts session timeout time, you can see it fire. Otherwise, you need something like a "logout" page and have asp code in there which manually calls session-onend. Then it will fire.

Old June 13th, 2005, 02:06 PM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

If I am one of the two developers saying that Session_OnEnd doesn't always fire, then here's one of the reasons:
quote:However, there is no guarantee that it fires. If you pull the power plug of your machine, the Session_OnEnds will not fire for any remaining / open session. There is no queue or whatever of open sessions maintained on disk. This means that you cannot use Session_OnEnd for things that *must, guaranteed 100%* run for a client, like close an order / shopping cart whatever.
And here's another:
quote:When you're using ASP.NET with SQL Server State storage the event doesn't even fire at all.
Both are actually very true.

I also said this:
quote:The problem with closing the browser or navigating to another page is not that Session_OnEnd is not guaranteed to fire, but that it doesn't fire *at all*, ever. This is by design.
My explanation below that quote says that it doesn't fire right after you close the browser, but after the timeout or by other means.

So generally, Session_OnEnd does fire in a lot of circumstances. However, it's not a transactional process so it's not guaranteed to fire. But for most practical purposes (not including ASP.NET Sql Server session state) you can assume it fires.

Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Finished Symphony (Soundtrack Mix) / Hybrid by Various Artists (Track 10 from the album: Ibiza Lounge) What's This?
Old June 13th, 2005, 02:52 PM
Registered User
Join Date: Jun 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

That was a great clarification. Thank you.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Session_OnEnd Question.... seananderson Classic ASP Basics 3 July 19th, 2007 03:54 PM
session_onend and databases scottlet Classic ASP Databases 2 May 30th, 2007 04:47 AM
help with session_onend chinedu Classic ASP Basics 8 October 26th, 2004 10:13 PM
Session_OnEnd v. SQL bluewater68 Classic ASP Professional 0 August 18th, 2003 04:25 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.