473,383 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Sesson_End in Global.asax

Session_End doesn't seem to get fired when a user closes their browser
as I thought it would. Since this seems to be the case, how do I execute
code that I want executed when a user closes the browser?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
7 1347
The session end event is not linked to a user closing their browser.
The session end event occurs when the session timer elapses.
You could use some client side code that fires on the window.close event but
you can never be sure that this is going to work.
I think you should re-think you problem. What it is you are trying to
achieve?

A

A
"Alex Smotritsky" <al*************@verizon.net> wrote in message
news:OC*************@tk2msftngp13.phx.gbl...
Session_End doesn't seem to get fired when a user closes their browser
as I thought it would. Since this seems to be the case, how do I execute
code that I want executed when a user closes the browser?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
A database developer I'm working with wants me to call one of his stored
procedures when a session ends for user tracking/logging purposes.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
What are the "tracking/logging purposes?" The reason I ask is that it may
not be necessary to run the SP when the browser closes. It may indeed be
acceptable to run them when the Session ends, depending upon the specific
requirements.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Alex Smotritsky" <al*************@verizon.net> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
A database developer I'm working with wants me to call one of his stored
procedures when a session ends for user tracking/logging purposes.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4
What are the "tracking/logging purposes?" The reason I ask is that it may
not be necessary to run the SP when the browser closes. It may indeed be
acceptable to run them when the Session ends, depending upon the specific
requirements.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Alex Smotritsky" <al*************@verizon.net> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
A database developer I'm working with wants me to call one of his stored
procedures when a session ends for user tracking/logging purposes.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #5
Ok but this doesn't really explain what you or the DBA are trying to achieve
so it's hard to help.
A
"Alex Smotritsky" <al*************@verizon.net> wrote in message
news:uH**************@TK2MSFTNGP12.phx.gbl...
A database developer I'm working with wants me to call one of his stored
procedures when a session ends for user tracking/logging purposes.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #6
If I understand correctly, what you're getting at is that in InProc
sessionState mode, some number of minutes (timeout or less) after the
user closes the browser the Session_End event in Global.asax will be
fired so I can run some code then and there?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #7
i'm looking for help at a more general level. inproc mode supports
session_end. i want to know if session_end will always get fired when
the session time ends even if a user closes their browser or goes to
another website.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #8

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

Similar topics

6
by: Alex Smotritsky | last post by:
Session_End doesn't seem to get fired when a user closes their browser as I thought it would. Since this seems to be the case, how do I execute code that I want executed when a user closes the...
12
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it...
8
by: Vishwanathan Raman | last post by:
Hi I have a declared a static DataSet object SOBJ in Global.asax.I also have a localy defined DataSet LSOBJ in Global.asax which I am storing in Application State.Is there any technical...
5
by: ad | last post by:
The Global.asax is code-inside with default. How to change Global.asax to code-behind?
4
by: John A Grandy | last post by:
I installed VS05 RC , created a new Web Site , but I do not see Global.asax , and I do not see Global.asax.cs in the App_Code dir ......
2
by: Steve | last post by:
I am new to this newsgroup & to .NET in general. I have been playing around with Visual Studio .NET, building and rendering web pages using VB "code behind" files. My problem / question is; How...
11
by: Ron | last post by:
I have a web project compiled with the new "Web Deployment Projects" plugin for VS2005. I'm deploying the web project to one assembly and with updateable option set to ON. When I'm running the...
1
by: GaryDean | last post by:
I notice that the global.asax in v2 is inline. because of this I can't say Session = conn; The compiler will accept it but at runtime the exception says "Session State is not available in this...
4
by: Al Santino | last post by:
Hello, I've created a simple C# web services project using Visual Studio 2005. My service compiles and runs correctly when called by remote clients. I'm able to step through the service in the...
4
by: Joe | last post by:
Hello all! I added a Global.asax to my application. I'm using the Application_BeginRequest event. Everything works fine in my development enviorment but when I publish the web site the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.