Solved

.NET GLobal.asax events - session end

Posted on 2004-08-20
2
1,390 Views
Last Modified: 2012-06-21
I have a procedure in the global.asax Session_End event which does not appear to be executing when the application is closed (ie. I shut down the browser). State is inproc. Any suggestions?

I am using VS.NET in debug mode and framework 1.1. Code in the event is:

Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
        ' Fires when the session ends
        Dim objCart As New Providence.ShoppingCart
        objCart.DeleteCart(Session.SessionID)
End Sub

I am using the sessionID as a unique (hopefully) key in the cart table. And I want to make sure any records are deleted if the user abandons the session.
0
Comment
Question by:ravl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
ihenry earned 50 total points
ID: 11871414

Session_End won't fire if you close your browser. HTTP is a stateless protocol, and the server has no way to know if your browser has been closed. Try running your application in debug mode, with a short <sessionState> timeout attribute. Visit the page and then wait. Wait until the End event kick in.
0
 
LVL 1

Author Comment

by:ravl
ID: 11876545
Of course! thank you iHenry.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question