global.asax

来自「程序源代码分成两个部分: &#61557 一部分是用记事本或EditPlus」· ASAX 代码 · 共 43 行

ASAX
43
字号
<Script Language="VB" Runat="Server">
    Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        Application.Lock()
	Application("AllUser")=0
    	Application("OnUser")=0
	Application.UnLock()

    End Sub

    Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
        Application.Lock()
	Application("AllUser") = Convert.ToInt32(Application("AllUser")) + 1
	Application("OnUser") = Convert.ToInt32(Application("OnUser")) + 1
	Application.UnLock()
	Session.Timeout = 1

    End Sub

    Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
        ' 在每个请求开始时激发
    End Sub

    Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
        ' 尝试对使用进行身份验证时激发
    End Sub

    Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
        ' 在发生错误时激发
    End Sub

    Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
        Application.Lock()
	Application("OnUser") = Convert.ToInt32(Application("OnUser")) - 1
	Application.UnLock()

    End Sub

    Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
        ' 在应用程序结束时激发
    End Sub

</Script>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?