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 sessions counter

Status
Not open for further replies.

INFORMAT

Programmer
Jan 3, 2001
121
BE
hi there

is there a easy way to count the number of sessions running on my iis?

thx
 
same thing as an active user counter.

put this in your global.asa(which needs to be in your webs root directory)

<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>


put this in your web page

There are <% =application(&quot;activevisitors&quot;) %> active sessions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top