Session_OnEnd doesn't work

Results 1 to 3 of 3

Thread: Session_OnEnd doesn't work

  1. #1
    Paully Guest

    Default Session_OnEnd doesn't work

    I am trying to find out how many sessions are still alive. The following works for the incoming "new" sessions but it doesn&#039t subtract when the session ends.<BR><BR>Thanks<BR><BR>-------------------------Global.asa-----------------<BR><BR>&#060;SCRIPT LANGUAGE=VBScript RUNAT=Server&#062;<BR>Sub Application_OnStart<BR><BR>Application("Active") = 0<BR><BR>End Sub<BR><BR>Sub Session_OnStart<BR><BR>Address = Request.Servervariables("REMOTE_ADDR")<BR><BR>Appl ication.lock<BR>Application("Active") = Application("Active") + 1<BR>Application.unlock<BR><BR><BR><BR>End Sub<BR><BR>Sub Session_OnEnd<BR><BR>Address = Request.Servervariables("REMOTE_ADDR")<BR><BR><BR> Application.lock<BR>Application("Active") = Application("Active") - 1<BR>Application.unlock<BR><BR><BR>End Sub<BR>&#060;/SCRIPT&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: Session_OnEnd doesn't work

    Are you sure? It takes 20 minutes for the session to time out after the browser is closed unless you explicitly call Session.Abandon().

  3. #3
    Paully Guest

    Default RE: Session_OnEnd doesn't work

    Yes, The number only goes up. Last night at 1 am I had 7,000 users.<BR><BR>That&#039s not right.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts