PDA

View Full Version : Session_OnEnd...


zduck
09-07-2002, 02:05 AM
I'm trying to make a counter for the active users on my web site with the basic following code in Global.asa

Sub Session_OnStart
Application.Lock
Application("active") = Application("active") + 1
Application.UnLock
End Sub

Sub Session_OnEnd
Application.Lock
Application("active") = Application("active") - 1
Application.UnLock
End Sub

This works fine I guess but whenever the user just closes the browser the server has to wait for the session to timeout for it to run the Session_OnEnd. How can I make it so that it runs the Session_OnEnd (or an equivilent) whenever someone closes the browser?

Thank You.

whammy
09-10-2002, 02:35 AM
YOu can change the session.timeout interval