简体   繁体   中英

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

I need to find using 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. Also this variable needs to be decremented when the *Session_End* event is fired.

  1. If you are using the ASP.NET Membership Provider - Membership.GetNumberOfUsersOnline()

  2. Or you could try one of the ASP.NET performance counters . State Server Sessions Active The number of currently active user sessions. This counter is available only on the computer where the state server service (as.net_state) is running.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM