简体   繁体   English

如何知道有多少用户同时浏览你的网页?

[英]How to find how many users are browsing your webpage at the same time?

I need to find using asp.net,我需要找到使用 asp.net,

How many users are browsing my website at any particular instance of time.在任何特定时间有多少用户正在浏览我的网站。

How can I do that?我怎样才能做到这一点?

You could use an application variable and increment it during *Session_Start* in the Global.asax.您可以使用应用程序变量并在 Global.asax 中的 *Session_Start* 期间递增它。 Also this variable needs to be decremented when the *Session_End* event is fired.当 *Session_End* 事件被触发时,这个变量也需要递减。

  1. If you are using the ASP.NET Membership Provider - Membership.GetNumberOfUsersOnline()如果您使用的是 ASP.NET 会员提供程序 - Membership.GetNumberOfUsersOnline()

  2. Or you could try one of the ASP.NET performance counters .或者您可以尝试ASP.NET 性能计数器之一。 State Server Sessions Active The number of currently active user sessions. State 活动服务器会话数当前活动的用户会话数。 This counter is available only on the computer where the state server service (as.net_state) is running.此计数器仅在运行 state 服务器服务 (as.net_state) 的计算机上可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在启用“私密浏览”的iPhone上检测用户? - How to detect users on an iPhone with “Private Browsing” enabled? 如何使用同一个CouchDB实例中的许多应用程序来处理`_users`数据库中的用户? - How to handle users in `_users` database with many applications in the same CouchDB instance? 如何编写算法来找出不同员工同时在办公室的次数? - How to write an algorithm to find out how many times different employee were at the office at the same time? 如何同时预览多张图片? - how to preview many pictures in a same time? 如何在网页上找到一个按钮 - How to find a button on webpage 集成 firebase 分析以查看有多少用户访问我的网页 - Integrating firebase analytics to just see how many users visit my webpage 如何打开网页并在其上运行JavaScript? - How to open a webpage and run your JavaScript on it? 如何同时为所有用户运行 JavaScript 代码并为所有用户显示相同的生成数字 - How can run JavaScript code for all users at the same time and display the same generated numbers for all users 如何在网页上显示多个用户的当前位置? - How to show current location of multiple users on webpage? 如何使使用Parse登录的用户可以看到网页? - How to make webpage viewable to users logged in with Parse?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM