Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

.NET GLobal.asax events - session end

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

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

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

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
Suggested Courses

618 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