Application in global.asa??

R

Ray at

Why it's decreasing? Because you have that line that is telling the
application variable to take a new value that is the result of the current
value with one subtracted from it. Is something not behaving the way you
expect it to? If so, what?

Ray at work
 
V

Vilmar Brazão de Oliveira

HI,
Does Anybody know why the routine bellow is decreasing on session_onend
event??
In my index.asp i have this statements:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Option Explicit
Response.Expires = -1
Response.Buffer = True
Session.Abandon()
%>

MY GLOBAL.ASA:
<script language="VBScript" runat="Server">

Sub Application_OnStart
Application("UsuariosOnline") = 0
End sub

Sub Application_OnEnd
End sub

Sub Session_OnStart
Application.Lock
Session.Timeout = 60 '»»60 min. = 1 h. Tempo de expiração da session padrão
no site.

If Application("UsuariosOnline") < 100 then
Application("UsuariosOnline") = Application("UsuariosOnline") + 1
Else
Response.Redirect "409.asp"
End If

Application.UnLock
End sub

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

</script>

THANKS,
--

Sem mais,

««««««««»»»»»»»»»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC
 
V

Vilmar Brazão de Oliveira

hi,
I have noted that:
Sub Session_OnEnd
Application.Lock
Application("UsuariosOnline") = Application("UsuariosOnline") - 1
Application.UnLock
End Sub

is not making the subtraction when the user close the session!
the session ends when the user close all the windows of the site, isn't
right?
thank you
--

««««««««»»»»»»»»»»»»»»
Vlmar Brazão de Oliveira
Desenvolvimento Web
HI-TEC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Global.asa 5
Global.asa 0
Global.asa 19
global.asa @ Session_OnEnd 1
Struggling With Learning to Application 2
corrupting global.asa 1
Global.asa 2
global.asa 9

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top