473,782 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SESSION_END Questions

1.) If I want to use an object that was stored in the Application state will
it be avilable in the Session_End event. (even on the last session to end)??
2.) Can I use the current sessions state in its own session_end event??

I asked because I am trying to log some data in this event and use both
scenarios above but nothing is happening.
Thanks!
Ron
Nov 19 '05 #1
5 1146
What happens if you set your session expration to say 1 minute, put a
breakpoint in those events you are interested in, and check the app and
session state yourself?
"Ron Vecchi" wrote:
1.) If I want to use an object that was stored in the Application state will
it be avilable in the Session_End event. (even on the last session to end)??
2.) Can I use the current sessions state in its own session_end event??

I asked because I am trying to log some data in this event and use both
scenarios above but nothing is happening.
Thanks!
Ron

Nov 19 '05 #2
From what I have seen, you can set the exp at 1 min and put a break point in
the code and have the break point work in debug mode. However, that does
not necessarily mean that it will work during normal running.

I have worked with this very scenario. What I found was that if you made
external calls to any data classes you built in the Session_End event, the
code does not seem to be executing. When I removed the external calls with
complete code in the End method, it works. It is a real pain in the
you-know-where, but it does work, at least for me. But, it is very flakey.

----Joel Zinn
"Serg" <Se**@discussio ns.microsoft.co m> wrote in message
news:EF******** *************** ***********@mic rosoft.com...
What happens if you set your session expration to say 1 minute, put a
breakpoint in those events you are interested in, and check the app and
session state yourself?
"Ron Vecchi" wrote:
1.) If I want to use an object that was stored in the Application state
will
it be avilable in the Session_End event. (even on the last session to
end)??
2.) Can I use the current sessions state in its own session_end event??

I asked because I am trying to log some data in this event and use both
scenarios above but nothing is happening.
Thanks!
Ron

Nov 19 '05 #3
Ron
What I was trying to do was log all web traffic made by the current session
and only store it in the database when the session ends. Seems like this
can't be done then...

Has anyone tried this? or no a way around it?
"Joel Zinn" <jw****@aep.com > wrote in message
news:%2******** **********@TK2M SFTNGP10.phx.gb l...
From what I have seen, you can set the exp at 1 min and put a break point
in the code and have the break point work in debug mode. However, that
does not necessarily mean that it will work during normal running.

I have worked with this very scenario. What I found was that if you made
external calls to any data classes you built in the Session_End event, the
code does not seem to be executing. When I removed the external calls
with complete code in the End method, it works. It is a real pain in the
you-know-where, but it does work, at least for me. But, it is very flakey.

----Joel Zinn
"Serg" <Se**@discussio ns.microsoft.co m> wrote in message
news:EF******** *************** ***********@mic rosoft.com...
What happens if you set your session expration to say 1 minute, put a
breakpoint in those events you are interested in, and check the app and
session state yourself?
"Ron Vecchi" wrote:
1.) If I want to use an object that was stored in the Application state
will
it be avilable in the Session_End event. (even on the last session to
end)??
2.) Can I use the current sessions state in its own session_end event??

I asked because I am trying to log some data in this event and use both
scenarios above but nothing is happening.
Thanks!
Ron


Nov 19 '05 #4
Yes, that is what I am doing. I guess I wasn't clear with what we have
done. The only way we could consistently get our db log entries created was
to code the entire database Insert code in the Session_End. That way we did
not have to call out to one of our dataclasses, which is apparently where
the problem with Global.Session_ End lie. If you call an outside object, it
it very internmittent.

--
-----
Joel Zinn
"Ron" <ve*******@nosp am.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
What I was trying to do was log all web traffic made by the current
session and only store it in the database when the session ends. Seems
like this can't be done then...

Has anyone tried this? or no a way around it?
"Joel Zinn" <jw****@aep.com > wrote in message
news:%2******** **********@TK2M SFTNGP10.phx.gb l...
From what I have seen, you can set the exp at 1 min and put a break point
in the code and have the break point work in debug mode. However, that
does not necessarily mean that it will work during normal running.

I have worked with this very scenario. What I found was that if you made
external calls to any data classes you built in the Session_End event,
the code does not seem to be executing. When I removed the external
calls with complete code in the End method, it works. It is a real pain
in the you-know-where, but it does work, at least for me. But, it is very
flakey.

----Joel Zinn
"Serg" <Se**@discussio ns.microsoft.co m> wrote in message
news:EF******** *************** ***********@mic rosoft.com...
What happens if you set your session expration to say 1 minute, put a
breakpoint in those events you are interested in, and check the app and
session state yourself?
"Ron Vecchi" wrote:

1.) If I want to use an object that was stored in the Application state
will
it be avilable in the Session_End event. (even on the last session to
end)??
2.) Can I use the current sessions state in its own session_end event??

I asked because I am trying to log some data in this event and use both
scenarios above but nothing is happening.
Thanks!
Ron



Nov 19 '05 #5
Ron
well thats unfortunate,

Thanks!

"Joel Zinn" <jw****@aep.com > wrote in message
news:eV******** ********@tk2msf tngp13.phx.gbl. ..
Yes, that is what I am doing. I guess I wasn't clear with what we have
done. The only way we could consistently get our db log entries created
was to code the entire database Insert code in the Session_End. That way
we did not have to call out to one of our dataclasses, which is apparently
where the problem with Global.Session_ End lie. If you call an outside
object, it it very internmittent.

--
-----
Joel Zinn
"Ron" <ve*******@nosp am.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
What I was trying to do was log all web traffic made by the current
session and only store it in the database when the session ends. Seems
like this can't be done then...

Has anyone tried this? or no a way around it?
"Joel Zinn" <jw****@aep.com > wrote in message
news:%2******** **********@TK2M SFTNGP10.phx.gb l...
From what I have seen, you can set the exp at 1 min and put a break
point in the code and have the break point work in debug mode. However,
that does not necessarily mean that it will work during normal running.

I have worked with this very scenario. What I found was that if you
made external calls to any data classes you built in the Session_End
event, the code does not seem to be executing. When I removed the
external calls with complete code in the End method, it works. It is a
real pain in the you-know-where, but it does work, at least for me. But,
it is very flakey.

----Joel Zinn
"Serg" <Se**@discussio ns.microsoft.co m> wrote in message
news:EF******** *************** ***********@mic rosoft.com...
What happens if you set your session expration to say 1 minute, put a
breakpoint in those events you are interested in, and check the app and
session state yourself?
"Ron Vecchi" wrote:

> 1.) If I want to use an object that was stored in the Application
> state will
> it be avilable in the Session_End event. (even on the last session to
> end)??
> 2.) Can I use the current sessions state in its own session_end
> event??
>
> I asked because I am trying to log some data in this event and use
> both
> scenarios above but nothing is happening.
>
>
> Thanks!
> Ron
>
>
>



Nov 19 '05 #6

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

Similar topics

9
10804
by: Kenn Ghannon | last post by:
I've got an ASP.NET page with a counter subtraction routine in the Session_End method in the Global.asax.cs: protected void Session_End(Object sender, EventArgs e) { ulong curUsers; Application.Lock();
3
1610
by: MattB | last post by:
Hi. I have a couple of questions regarding the Session_End event. I have some clean-up code in this event and it does fire when the session times out, which is good. I also want to have this (or similar) code fire when the session ends prematurely, like when the browser window is closed or Session.Clear is called. It appears that does not happen, but is there any way I can force it or is there a different event that would fire in these...
7
1645
by: Henry | last post by:
I have a question on session_end. I'm trying to log into my database when the session times out, it will store user info into a table. When I got step into a line where I was trying to open connection (I had it set to timeout in 1 minute, and ran it in debug mode), nothing happens. I read somewhere before about how database call can't work with these settings in my web.config file. I'm using <authentication mode="Windows" /> and <identity...
1
4719
by: Timo | last post by:
A few questions relating to sessions ending. 1. What happens to the session when a user closes the browser? Does the session remain alive until it times out? 2. In the Session_End eventhandler, is it possible to distinguish between a timeout and an explicit call to Session.Abandon (e.g. from a logout page) without setting a session variable in the code that invokes Session.Abandon? 3. In the Session_End event, what is the
5
1471
by: gce | last post by:
Hi, Every session I make a temp directory using Session("SessieGuid") = System.Guid.NewGuid().ToString Whenever the user presses a button to end everything or when the session.timeout fires up, I need to remove the directory. My question : 1. What command is needed behind the END-button to close the session
1
1301
by: srivalli c via DotNetMonster.com | last post by:
Hi, When asp.net worker process or application pool recycles, is it guaranteed that the Session_End event fires for all active sessions? Any help is greatly appreciated. Thanks in advance. Srivalli.
4
253
by: news.microsoft.com | last post by:
I am reposting this because the person who replied to my original post did not understand me. Please dont post a reply unless you 'absolutley ' know what I am talking about and have a solution or an absolute reason why there is no solution. I want to log when a user logs off, so I wanted to use the session_end event. This 'Does Fire' when the session expiry ends for the current session. However, this event seems to fire 'After the...
8
5770
by: Roger | last post by:
When I call the session.abandon() method, it calls the session_end event. When a user closes the browser or clicks the log off button, I can dispose of objects and abandon the session cleaning. But, when a user either navigates away from the web app and when the session timesout, the session_end event does not seem to fire. Or when else can I dispose of objects? Or is there an event I can you that is fired when a user navigates away from...
12
10700
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
Hi. I am trying to maintain a list of people who are currently "online" in SQL. I do this by adding a simple entry to a simple PeopleOnline table whenever someone logs in to my site. If they manually log OUT of the site, I have no problem deleting them from the PeopleOnline table. But if they just close the browser, I was assuming I'd have to use the Session_End() event in Global.asax even though I know that this will only occur once the...
0
9641
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7494
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6735
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
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 we have to send another system
2
3643
muto222
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.