Re: prevent duplicate logins



On May 21, 5:45 am, Jeff Beem <JeffB...@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
The only other option I can think of is to force the user to wait until the
other account times out, which would be a severe annoyance for most, I
believe.


Another way that I can think of to implement this is to have an Ajax-
based validation request (on each page of the application) to check if
the current session is still valid, or not. Whenever a user has to be
logged off at the original box, you will be notified by that request
and you could automatically execute your SignOut method. The only
thing is that you probably cannot run that Ajax request every 1 sec
and so, you cannot log the user off at the original box before the new
login. Running the validation request every 60 secs you could be sure
that an original login will be logged off during 0..59 secs *after*
the user has logged on again.

.