You can't, as you need the Session_OnEnd to remove the current session from the list. It can be done without, but you cannot guarantee that the user will log out manually.
I prefer to create a list of sessionID's when someone enters the site
Code:
Application.Lock
Application("all_sessions")=Application("all_sessions") & Session.SessionID & "|"
Application.UnLock
then you can add the users name to their sessionID when they have logged in
Code:
application.lock
Application("all_sessions")=replace(Application("all_sessions"),session.sessionid,session.sessionid & ":" & user_name)
application.unlock
and remove it with Session_OnEnd in global.asa with
Code:
Sub Session_OnEnd
dim objRegExp
SET objRegExp = NEW RegExp
objRegExp.pattern = Session.SessionID & "(:\w+)?\|"
objRegExp.global = true
Application.Lock
Application("all_sessions") = objRegExp.replace(Application("all_sessions"),"")
Application.UnLock
SET objRegExp = NOTHING
End Sub
I don't know if there's a more accurate way
Bookmarks