473,386 Members | 1,715 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,386 software developers and data experts.

Session variables and Session_OnEnd

Hi,

When the Session_OnEnd event fires, do the Session variables still exist?
I want to do some cleanup (update some records in a database etc.),
but then I need to know *which* recopds to update ...

Can I access these session variables through HttpContext.Current.Session ?
(the cleanup-code is in a separate class, which is defined within the
website)
Hans Kesting
Nov 17 '05 #1
6 1755
Hi

You can access Session Variables through
HttpContext.Current.Session.

Ravikanth
-----Original Message-----
Hi,

When the Session_OnEnd event fires, do the Session variables still exist?I want to do some cleanup (update some records in a database etc.),but then I need to know *which* recopds to update ...

Can I access these session variables through HttpContext.Current.Session ?(the cleanup-code is in a separate class, which is defined within thewebsite)
Hans Kesting
.

Nov 17 '05 #2
Yes, I know, I already use that.
But: are those session variables *still* available when handling the
Session_OnEnd event?

Or to put it in another way: exactly *when* is this event fired?
- right after the session has expired (so any stored variables are gone), or
- just before expiring (so that any stored variables are still available)

I hope the second one is true, as that is the most useful.

Hans Kesting

"Ravikanth[MVP]" <dv*********@hotmail.com> wrote in message
news:0a****************************@phx.gbl...
Hi

You can access Session Variables through
HttpContext.Current.Session.

Ravikanth
-----Original Message-----
Hi,

When the Session_OnEnd event fires, do the Session

variables still exist?
I want to do some cleanup (update some records in a

database etc.),
but then I need to know *which* recopds to update ...

Can I access these session variables through

HttpContext.Current.Session ?
(the cleanup-code is in a separate class, which is

defined within the
website)
Hans Kesting
.

Nov 17 '05 #3
Yes, I know, I already use that.
But: are those session variables *still* available when handling the
Session_OnEnd event?

Or to put it in another way: exactly *when* is this event fired?
- right after the session has expired (so any stored variables are gone), or
- just before expiring (so that any stored variables are still available)

I hope the second one is true, as that is the most useful.

Hans Kesting

"Ravikanth[MVP]" <dv*********@hotmail.com> wrote in message
news:0a****************************@phx.gbl...
Hi

You can access Session Variables through
HttpContext.Current.Session.

Ravikanth
-----Original Message-----
Hi,

When the Session_OnEnd event fires, do the Session

variables still exist?
I want to do some cleanup (update some records in a

database etc.),
but then I need to know *which* recopds to update ...

Can I access these session variables through

HttpContext.Current.Session ?
(the cleanup-code is in a separate class, which is

defined within the
website)
Hans Kesting
.

Nov 17 '05 #4
MSDN :
"The Session_OnEnd event occurs when a session is abandoned or times
out. Of the server built-in objects, only the Application, Server, and
*Session* objects are available. "

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #5
MSDN :
"The Session_OnEnd event occurs when a session is abandoned or times
out. Of the server built-in objects, only the Application, Server, and
*Session* objects are available. "

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #6
Thanks,

I did search for it, but couldn't find the correct entry.

Hans Kesting

"Natty Gur" <na***@dao2com.com> wrote in message
news:eR**************@TK2MSFTNGP10.phx.gbl...
MSDN :
"The Session_OnEnd event occurs when a session is abandoned or times
out. Of the server built-in objects, only the Application, Server, and
*Session* objects are available. "

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #7

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

Similar topics

3
by: Johnd | last post by:
Is there a server-side event that fires when the session variable expires that i can trap and do something with (ie renew the session Variable or say run an asp to update a database) John,
2
by: Amit D.Shinde | last post by:
Hello Experts.. I need some help regarding cookies and session objects and also global.asa file I am creating one cookie when a user logs in on my website. The cookie stores the login name of...
4
by: HolaGoogle | last post by:
hi there, i've 2 questions for you guys.... 1: is there any way to "force" a session_onend(), session timeout or at least call my logout method when a user leaves the application window without...
6
by: Brian Brinks | last post by:
I am having some trouble with seesion variables. I have just moved hosting companies to Brinkster.com but have been having problems with my applications holding session. They say they can't...
1
by: Hans Kesting | last post by:
Hi, When the Session_OnEnd event fires, do the Session variables still exist? I want to do some cleanup (update some records in a database etc.), but then I need to know *which* recopds to...
11
by: Vishal | last post by:
Hello, can anybody tell me how I can extend the session expiry time? Is it done via code or via IIS? Sorry I am new and dont know about this.
11
by: David Thielen | last post by:
Hi; Is there some kind of session ID variable that I can get in the code behind and that is available in Session_OnEnd() to know what session ended? -- thanks - dave...
4
by: abcd | last post by:
When IIS is restarted session_onEnd is called. though the debugger is not available at this point in Session_onEnd, is there any way that the code in session_onEnd is running due to iis restart and...
5
by: =?Utf-8?B?TWljaGFlbA==?= | last post by:
I am using asp.net 2.0 and trace session.start and session.end. Sometimes I found that session.end is not catched. Is it a normal behavior, or why it happens?
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.