473,471 Members | 4,616 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Catch Lost Session

Is there any way in ASP to catch a destroyed session when the user closes
their window.

Example.

- When a user enters a page, I create a session - Session("blah")="blah"
- However when the window is closed, the session is destroyed, but before
it's being destroyed, I want to some things....

Any thoughts?
Jul 19 '05 #1
2 1480

"Kit Truong" <ki*@e-nablesolutions.ca> wrote in message
news:Pn********************@news20.bellglobal.com. ..
Is there any way in ASP to catch a destroyed session when the user closes
their window.

Example.

- When a user enters a page, I create a session - Session("blah")="blah"
- However when the window is closed, the session is destroyed,
This is not true.
but before
it's being destroyed, I want to some things....


Sub Session_OnEnd()
'''your code
End Sub

in global.asa in the application root.

Ray at work
Jul 19 '05 #2
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:Or**************@TK2MSFTNGP12.phx.gbl...

"Kit Truong" <ki*@e-nablesolutions.ca> wrote in message
news:Pn********************@news20.bellglobal.com. ..
Is there any way in ASP to catch a destroyed session when the user closes their window.

Example.

- When a user enters a page, I create a session - Session("blah")="blah"
- However when the window is closed, the session is destroyed,


This is not true.
but before
it's being destroyed, I want to some things....


Sub Session_OnEnd()
'''your code
End Sub

in global.asa in the application root.

Ray at work


session_onend is not a good place to put any code. It doesn't fire reliably.
Better find somewhere else to run code which does any clean up you might
need.

There is no way for the web server to know that you have closed a browser
down.

--
John Blessing

http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.free-helpdesk.com - Completely free help desk software !
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: CJ | last post by:
Hi We have Session Data lost randomly and Session State expired early. Our Intranet Application uses Window Server 2003 and .Net Framework 1.1. We set Session Time out to 60 minutes. but user...
6
by: Tony G. | last post by:
Hi there, I have an APS 3 application, running on a Windows 2003 Web edition server - it is a very busy website, and when users are click on certain links (membership info), a new window i...
1
by: Eliyahu Goldin | last post by:
When I run my ASP.NET application first time after deployment, it runs OK. On the second run, when one of my web forms tries to read session variables set in another form, it finds them empty....
5
by: rich00 | last post by:
i am developing an asp.net web based application using javascript as the server side scripting language. The application makes constant use of an access database and session variables. in a random...
3
by: William | last post by:
Hi I have an ASP.NET application that connects to an Access database. Everything works fine except for the Session object. Data in the session object is lost after I've made a call to the...
9
by: AndersBj | last post by:
Hi all, I have a web application that uses State Server for session handling. The web application randomly loses all session variables. The sessions are not always lost, sometimes I can use the...
7
by: Erik | last post by:
I have an application that uses sessions variables a lot but one I publish the application on the prod server these variables are lost. The application is written i c# 2.0 and I've set the...
3
by: AlonR | last post by:
Hi, We're experiencing random user sessions losses on our web applications, and are researching for any useful information which may shed light on this problem. Environment: In our...
2
by: maxkumar | last post by:
Hi, I am running a ASP.NET 1.1 site on Win Server 2003 with IIS 6.0. The website has been running for about 1.5 years now. In the past, we used to have random cases of session variables getting...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.