soamazing
soamazing

Reputation: 1696

Count online user using asp.net c#

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

Answers (3)

Svarog
Svarog

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

jrummell
jrummell

Reputation: 43077

If you are using Membership, you can simply call Membership.GetNumberOfUsersOnline().

Upvotes: 2

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

Related Questions