Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active User counter not working

Status
Not open for further replies.

travmak

Programmer
Apr 26, 2002
133
US
global.asa

<SCRIPT LANGUAGE=&quot;VBScript&quot; RUNAT=&quot;Server&quot;>
Sub Application_OnStart
application(&quot;activevisitors&quot;)=0
End Sub

Sub Application_OnEnd
End Sub

Sub Session_OnStart
application.lock
application(&quot;activevisitors&quot;)=application(&quot;activevisitors&quot;)+1
application.unlock
End Sub

Sub Session_OnEnd
application.lock
application(&quot;activevisitors&quot;)=application(&quot;activevisitors&quot;)-1
application.unlock
End Sub

</SCRIPT>

default.asp

<%=application(&quot;activevisitors&quot;)%>: Users
 
It worked fine on the development server, then when I published it to the live server it didn't work.
 
Just checking but is the Global.asa in the root directory. That's the only reason I can think this would not work. Code looks fine to me. I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
 
yeah its in the root, can IIS be hosed or set not to accept application variables?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top