[thelist] asp and viewing client sessions. .

Athena Janiszewski athenaj at rogers.com
Wed Jan 23 22:42:57 CST 2002

Hello all,

I thought of doing something today in asp and realized I had no clue how to
do it, though I'm pretty sure it must be possible. I'm not sure exactly how
to phrase it though I know exactly what I mean. . an example might suffice.
k, everytime someone logs into my site i set a session variable with their
userID. I'd like to embed a script in one of the administrative pages that
displays how many people are currently logged in at any given time. .is
there a way to find out how many sessions have been created? Is this just
value stored in some obscure server variable structure??

The only way I could think of doing this otherwise would be updating a
dateTime column 'online' in the usersTbl and having that embedded script
check the usersTbl for who is online. . but then if they don't formally log
out, when could the 'online' column be updated to null?

I thought there could be a some routine or scheduled script that runs to
clean up the 'online' column for users who were online x hrs ago. .but what
if they still are logged in when that script runs? And plus its not
accurate, its a guess at that point. And I read in quite a few places that
using the on session end, on application end etc in global.asa doesn't
always work or is buggy. But my solution seems so yucky/messy. . .

Has anyone here done something like this before?

Thanx in advance,

More information about the thelist mailing list