Reputation: 1696
Can any one help me. I've been looking on how to count how many users are login to my site but using asp.net - c#.
Upvotes: 0
Views: 3182
Reputation: 2208
In case you don't use membership(as jrummell suggested):
You will have to implement your own counter as far as I know.
Just add an integer to the Application dictionary and increment it every time somebody logs in.
Decrement it in logoff and in the Session_End event(don't forget to check that the session that just ended had an active login - of course.
Upvotes: 1
Reputation: 43077
If you are using Membership, you can simply call Membership.GetNumberOfUsersOnline().
Upvotes: 2
Reputation: 11844
Here's a tool to know that refer to Online active users counter in ASP.NET. Its easy to install. It had worked well for me.
Upvotes: 0