protected void Application_Start()
{
Application["OnLineUserCount"] = 0;
AreaRegistration.RegisterAllAreas();
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
}
protected void Session_Start(object sender, EventArgs e)
{
Application.Lock();
Application["OnLineUserCount"] = Convert.ToInt32(Application["OnLineUserCount"]) + 1;
Application.UnLock();
}
protected void Session_End(object sender, EventArgs e)
{
Application.Lock();
Application["OnLineUserCount"] = Convert.ToInt32(Application["OnLineUserCount"]) - 1;
Application.UnLock();
}
版权声明:除特别声明外,本站所有文章皆是本站原创,转载请以超链接形式注明出处!