?
Solved

.NET GLobal.asax events - session end

Posted on 2004-08-20
2
Medium Priority
?
1,406 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 200 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
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 set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

770 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