Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 March 10th, 2004, 05:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default Session_End

Hello,

I was wondering if it was a good practice to, in the Session_End method, wrap up some loose ends. I want to check that certain work was updated against the SQL Server database when the user's session expired.

Does the Session_End ALWAYS trigger when the user logs off in the following scenarios:

- closes the browser
- navigates to a different page
- browser crash

Thanks,

Brian Mains
__________________
Brian
 
Old March 10th, 2004, 05:41 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I have learned to never rely on session_end. It might work in .NET but it was always problematic in ASP. I don't know how IIS acts differently when it's running the .NET framework, if at all.

Navigating to a different page would certainly not cause session_end to fire because that would keep the session active. If anything the session_end would (should!) fire when the server times out the session. i don't think that any user action could result in that event. When you close the browser, it doesn't call the server and tell it "I'm done with the session." That's all up to the server.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Global.Asax Session_End and Session.SessionID MissHenesy ASP.NET 2.0 Professional 7 November 3rd, 2009 01:20 AM
problemas con el evento Session_End Adlorenzo ASP.NET Espanol 2 January 22nd, 2005 03:39 PM





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