473,386 Members | 1,798 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_end Global.asax

Hi Guys,

I maintain login info for users in table such as who, when and sessionId.
When they click log off, i note the time in table.

Some of these users just close the window therefore i end up with Nulls in
the Log off field. How can i log the time when the session expires using the
session_end event?

Thanks

Manny
Nov 19 '05 #1
4 2259
This is hard to do given the disconnected nature of HTTP. Another approach
is to log every visit, and assume they're logged off at some time after their
last visit.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi Guys,

I maintain login info for users in table such as who, when and
sessionId. When they click log off, i note the time in table.

Some of these users just close the window therefore i end up with
Nulls in the Log off field. How can i log the time when the session
expires using the session_end event?

Thanks

Manny


Nov 19 '05 #2
In your Session_End, you can just get the current time via DateTime.Now.

"Manny Chohan" <Ma*********@discussions.microsoft.com> wrote in message
news:75**********************************@microsof t.com...
Hi Guys,

I maintain login info for users in table such as who, when and sessionId.
When they click log off, i note the time in table.

Some of these users just close the window therefore i end up with Nulls in
the Log off field. How can i log the time when the session expires using
the
session_end event?

Thanks

Manny

Nov 19 '05 #3
Can i get the session id in session_end event?

"Marina" wrote:
In your Session_End, you can just get the current time via DateTime.Now.

"Manny Chohan" <Ma*********@discussions.microsoft.com> wrote in message
news:75**********************************@microsof t.com...
Hi Guys,

I maintain login info for users in table such as who, when and sessionId.
When they click log off, i note the time in table.

Some of these users just close the window therefore i end up with Nulls in
the Log off field. How can i log the time when the session expires using
the
session_end event?

Thanks

Manny


Nov 19 '05 #4
this.Session.SessionID

"Manny Chohan" wrote:
Can i get the session id in session_end event?

"Marina" wrote:
In your Session_End, you can just get the current time via DateTime.Now.

"Manny Chohan" <Ma*********@discussions.microsoft.com> wrote in message
news:75**********************************@microsof t.com...
Hi Guys,

I maintain login info for users in table such as who, when and sessionId.
When they click log off, i note the time in table.

Some of these users just close the window therefore i end up with Nulls in
the Log off field. How can i log the time when the session expires using
the
session_end event?

Thanks

Manny


Nov 19 '05 #5

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

Similar topics

9
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; ...
2
by: Bela | last post by:
Hello I was wondering if someone could help me out with a Session_End problem in my Global.asax. I've tried everything, and still no success Here is the scenario: sessionstate is set to InProc....
2
by: Bonj | last post by:
Hi I have an ASP.NET application which implements a server-side charting solution, for this it needs to generate .gif files which are then sent to the browser via a literal which has its text set...
1
by: Samuel Stanojevic | last post by:
- I'm using .NET Framework 1.1. I just noticed that whenever I change the value of Session.Timeout (no matter which aspx page this happens on), at the end of the request, the 'Session_End'...
4
by: Kim Bach Petersen | last post by:
I would like to record user behavior data stored in session variables. Since the data is modified throughout each session it seemed obvious to store the data when the session terminates - using...
2
by: James Hunter Ross | last post by:
Friends, In our Global.asax file we implement Session_End() which grabs our own object and then calls our own logout() method to tidy things up. Code is below. (We wrap this in try/catch, but...
14
by: Bruno | last post by:
We are attempting to automatically log users off from the Session_End event in global.asax. It is not a critical task, more of a housekeeping task so that we know if users have closed down their...
12
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...
3
by: Mufasa | last post by:
I have code in my session_start to create a temp directory for the session. On session_end it is supposed to delete the directory but doesn't seem to be firing. I've enclosed the code below. ...
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
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...
0
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,...

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.