Hi all,
My client, bless his soul, wants to know how long users of his ASP.NET web
application (written by yours truly) spend logged in to the system. Now, I
can log when he logs in, no problem, but being disconnected in nature, its
hard to trap when then user effectively "closes" the session. He could click
a logout button, just close his browser or even end the IEXPLORER task from
the task manager.
Anyone done something like this before? Any special tips or tricks anyone
know of?
Thanks in advance 4 1713
Use the Session_OnStart and Session_OnEnd events to record (1) The beginning
of the Session, and (2) the end of each Session.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer http://www.takempis.com
Big Things are made up of
Lots of Little Things.
"Murray Foxcroft" <fo****@xsinet.co.za> wrote in message
news:bt********************@is.co.za... Hi all,
My client, bless his soul, wants to know how long users of his ASP.NET web application (written by yours truly) spend logged in to the system. Now, I can log when he logs in, no problem, but being disconnected in nature, its hard to trap when then user effectively "closes" the session. He could
click a logout button, just close his browser or even end the IEXPLORER task
from the task manager.
Anyone done something like this before? Any special tips or tricks anyone know of?
Thanks in advance
Thanks for the reply Kevin, my problem being a little more tricky with an
authentication login on the site, and only authenticated sessions, per user,
must be recorded. I log the login, but associating the logout is harder,
especially in the case of a service / server restart or the like.
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:#i*************@TK2MSFTNGP11.phx.gbl... Use the Session_OnStart and Session_OnEnd events to record (1) The
beginning of the Session, and (2) the end of each Session.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Big Things are made up of Lots of Little Things.
"Murray Foxcroft" <fo****@xsinet.co.za> wrote in message news:bt********************@is.co.za... Hi all,
My client, bless his soul, wants to know how long users of his ASP.NET
web application (written by yours truly) spend logged in to the system. Now,
I can log when he logs in, no problem, but being disconnected in nature,
its hard to trap when then user effectively "closes" the session. He could click a logout button, just close his browser or even end the IEXPLORER task from the task manager.
Anyone done something like this before? Any special tips or tricks
anyone know of?
Thanks in advance
I believe that you still have the session at the Session_OnEnd event. If you
don't, then this message is meaningless.
Anyways, assuming you do, it shouldn't be too hard to check the session to
see what user it is and then log that into the database. Remember that that
means <session timeout> minutes ago, they effectively logged out of the
system.
In terms of service/server restarts, I don't know what to tell you except
that you should know when your service/server restarts. Perhaps a database
script that fills in missing values once a day with the times of
service/server restarts? Or flag those, since those are users who very
likely abruptly lost access to the site.
John Christensen
Genesee Survey Services, Inc.
"Murray Foxcroft" <fo****@xsinet.co.za> wrote in message
news:uM********************@is.co.za... Thanks for the reply Kevin, my problem being a little more tricky with an authentication login on the site, and only authenticated sessions, per
user, must be recorded. I log the login, but associating the logout is harder, especially in the case of a service / server restart or the like.
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message news:#i*************@TK2MSFTNGP11.phx.gbl... Use the Session_OnStart and Session_OnEnd events to record (1) The beginning of the Session, and (2) the end of each Session.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Big Things are made up of Lots of Little Things.
"Murray Foxcroft" <fo****@xsinet.co.za> wrote in message news:bt********************@is.co.za... Hi all,
My client, bless his soul, wants to know how long users of his ASP.NET web application (written by yours truly) spend logged in to the system.
Now, I can log when he logs in, no problem, but being disconnected in nature, its hard to trap when then user effectively "closes" the session. He could click a logout button, just close his browser or even end the IEXPLORER task from the task manager.
Anyone done something like this before? Any special tips or tricks anyone know of?
Thanks in advance
Well, then, in the login page handler add the Session ID of the user to a
Cached Collection. In the Session_End, check the Collection for the Session
ID and if it is in the Collection, remove it from the Collection, and record
it.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer http://www.takempis.com
Big Things are made up of
Lots of Little Things.
"Murray Foxcroft" <fo****@xsinet.co.za> wrote in message
news:uM********************@is.co.za... Thanks for the reply Kevin, my problem being a little more tricky with an authentication login on the site, and only authenticated sessions, per
user, must be recorded. I log the login, but associating the logout is harder, especially in the case of a service / server restart or the like.
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message news:#i*************@TK2MSFTNGP11.phx.gbl... Use the Session_OnStart and Session_OnEnd events to record (1) The beginning of the Session, and (2) the end of each Session.
-- HTH,
Kevin Spencer Microsoft MVP .Net Developer http://www.takempis.com Big Things are made up of Lots of Little Things.
"Murray Foxcroft" <fo****@xsinet.co.za> wrote in message news:bt********************@is.co.za... Hi all,
My client, bless his soul, wants to know how long users of his ASP.NET web application (written by yours truly) spend logged in to the system.
Now, I can log when he logs in, no problem, but being disconnected in nature, its hard to trap when then user effectively "closes" the session. He could click a logout button, just close his browser or even end the IEXPLORER task from the task manager.
Anyone done something like this before? Any special tips or tricks anyone know of?
Thanks in advance
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Maverick |
last post by:
Hello all,
I read some good reviews about jakarta HTTPClient about its session
and cookies management system and fancied giving it a try as a
learning exercise but somehow I don't seem to be able...
|
by: Jawahar Rajan |
last post by:
All,
I know that using Session.Contents is frowned upon by some.
But I feel I am in situation where I cannot avoid it. I think it is better
than using a QueryString.
Is there a length on the...
|
by: dale zhang |
last post by:
Hi groups,
Can anyone give me the equivalent C# sharp code for this VB.ET code,
:: VB.NET ::
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) _
Handles...
|
by: Greg Linwood |
last post by:
I'm having difficulty understanding Session state in ASP.Net. It's almost
embarrassing asking this as I've been using ASP since it was first released
& it really shouldn't be this hard to use -...
|
by: Chris Newby |
last post by:
My project currently requires that I integrate an ASP.NET application with
an ASP application. One of the issues I'm having is that I have some very
long strings being created in an ASP.NET...
| |
by: charliewest |
last post by:
Hello -
I have images saved in my SQL SERVER 2000 database. Using ASP.NET (C#) is
there any way to temporarily save an image to a session object, and after
running some other operations, later...
|
by: aroraamit81 |
last post by:
Hi,
I am facing a trouble. I have some Session variables in my code and
somehow my session variables are getting mixed up with other users.
For example User A has access to 10 companies and...
|
by: aroraamit81 |
last post by:
Well Guys, Here is a very strange trouble. When more than one users
request tto same page at the same time then our session gets
conflicted.
Moreover I printed my SessionID, strangely but true I...
|
by: rgparkins |
last post by:
Hello
I am running out of time with a problem I have running PHP 5.04 and
Apache 2.0 and really need help :(. I have a page that stores a
variable in session but each time I reload that page the...
|
by: J055 |
last post by:
Hi
I have the following code. I upload an XML file using the FileUpload object,
store the stream in a session so the user gets the chance to confirm some
options then pass the stream from the...
|
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...
| |
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,...
|
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: 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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |