Last post Jan 02, 2014 09:12 AM by bbcompent1
Jan 02, 2014 08:38 AM|er manish|LINK
Suppose there is user with username TEST and if he is login from machine A then we want from another machine B if a person tries to login with TEST User name he should not be allowed to login.
I have tried this code to do this
MembershipUser objr = Membership.GetUser(txtUsername.Text, false);
online = objr.IsOnline;
if (online ==true)
//and in web.config i have added this
<membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="1">
But problem is that this code only runs for 1 min a user tires to login after 1 min then he is able to login with same user name and password
I am using asp.net membership and C#.
Jan 02, 2014 09:12 AM|bbcompent1|LINK
Take a look at this thread on Stack Overflow discussing this very thing: