I am using .NET 3.5.
Also, Forms Authentication is used.
Is there any way to get the list of ALL logged-in users or a count in ASP.NET?
Note: I am not using Memberships and Roles
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No there isn’t unless
You have defined one in your own code
You are using the default ASPNET Membership Provider which has a
GetNumberOfUsersOnline()method defined.You are using a custom Membership Provider and have provided an implementation for the
GetNumberOfUsersOnline()method yourselfThe default ASPNET Membership provider calculates number of users online by querying the SQL Server database and checking the
LastActivityDatestored against each user against the definedUserIsOnlineTimeWindowproperty that you can set in web.config. If theLastActivityDateis greater than the current time minus theUserIsOnlineTimeWindowvalue (which represents minutes), then a user is considered to be online.If you wanted to do something similar then you might consider implementing a similar method. you can see the code for the default providers by downloading the source code. To complete your picture, you might also want to run aspnet_regsql.exe so that you can see the stored procedures that the default providers use.