Click here to Skip to main content
15,909,051 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
who can tell me the way limit login time of user, if user login failed three times on same time then him acc will bi block!
Posted

What i would suggest is that keep a webconfig app settings key that has the max threshold login attempt count. When you land the login page(for the first time) create a session variable that holds value as 0 . On successive login failed attempts, increase the session value and check for the max threshold using the app setting key, then block the user in the database.

If you want this to limit based on the time, you could refer the below link

http://stackoverflow.com/questions/355602/locking-out-a-user-in-an-asp-net-custom-membership-provider[^]

In membership you have two properties

maxInvalidPasswordAttempts
passwordAttemptWindow

You can use them.
 
Share this answer
 
v2
Comments
killerqx1 15-Mar-12 5:51am    
i am not using login control of visual studio!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900