This works as i have tested it. If it doesn't work for you, you have incorrectly configured IIS.
Global.asa
<script language="vbscript" runat="server">
sub Application_OnStart
Application("Users") = 0
end sub
sub Application_OnEnd
'some code
end sub
sub Session_OnStart
Application.Lock
Application("Users") = CInt(Application("Users")) + 1
Application.Unlock
end sub
sub Session_OnEnd
Application.Lock
Application("Users") = CInt(Application("Users")) - 1
Application.Unlock
end sub
</script>
index.asp
<%@Language="VBScript"%>
<%Option Explicit%>
<% Response.CacheControl = "no-cache" %>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>
<%
Response.Write(Application("Users"))
%>
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========