I basically need to restrict the number of logged in users in my application. What I am doing is using Membership.GetNumberOfUsersOnline()
I am getting the number of logged in users while authenticating a new user I check the number of online users to the number I want to restrict.
Membership.GetNumberOfUsersOnline()
works fine when a new user logs in, the problem occurs when a user signs out the value of Membership.GetNumberOfUsersOnline()
does not automatically decrements. I searched over the msdn and found that this method checks the last user activity time, which doesnt support signout event.
Is there any other way in Membership
providers to restrict the number of users.
I am using Silverlight
and REST
services. I am using Membership.GetNumberOfUsersOnline()
at the server side.
Thanx in advance.