"Petter Harnes" <pe**********@hotmail.com> wrote in message
news:68**************************@posting.google.c om...
We have a solution where we want to control the number of users logged
in at the same time.
So when the user log in we check number of currentusers agains
allowedusers and increment a currentusers (in the database).
On Session_onEnd or when a user logout (actually I abandon the session
on logout) we decrease currentusers.
But as we all know when the browser is closed or the user just go to
another site this decrease does not appear.
It will of course trigger when Session goes to timeout, but I imagine
a lot of angry users calling support when they are denied access.
Petter Harnes
Technical Manager
Eiendomsverdi AS
http://www.ev.no
There is no simple solution. I found it best to implement my own timeout.
When a user logs in, create a record in the database. Each time the user
acesses the database, update a "lastused" value for that user.
If session_onend fires (and it is not reliable), remove that user from the
"currentusers" table.
When someone logs in, remove any currentusers whose "lastused" value is
older than the interval you think is reasonable.
--
John Blessing
http://www.LbeHelpdesk.com - Help Desk software priced to suit all
businesses
http://www.room-booking-software.com - Schedule rooms & equipment bookings
for your meeting/class over the web.
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook