有一种方法可以管理asp.net运行应用程序的会话数量吗?我想在一个页面中展示它,也许还有一些其他重要信息(如果有的话).而且,我该怎么办?
@H_301_2@
解决方法
在global.asax中,执行以下操作:
Application["LiveSessionsCount"] = 0;
Application["LiveSessionsCount"] = ((int) Application["LiveSessionsCount"]) + 1;
Application["LiveSessionsCount"] = ((int) Application["LiveSessionsCount"]) - 1;
int LiveSessionsCount = (int) Application["LiveSessionsCount"];@H_301_2@ @H_301_2@