Sub Application_OnStart
Application("SessionCount") = 0
End Sub
Sub Session_OnStart
Application.Lock
Application("SessionCount") = Application("SessionCount") + 1
Application.Unlock
If Application("SessionCount") > 100 Then
Application.Lock
Application("SessionCount") = 0
Application.Unlock
' Here you would put any code you need to run
' do not surround the code with <% %> tags
' For example you might run a database query that checks for expired accounts
End if
End Sub
global.asa例子二
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10294527/viewspace-124712/ ,如需转载,请注明出处,否则将追究法律责任。