ID Block
how to block a ID after 3 un-successfull attempts but that ID again active after 20 minutes............how to solve this prob please help me.......
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Shweta LodhaRank #31 · 39.8K reputationPosted Feb 8, 2014, 10:16 AM EST
1. Either use a ASP.net membership provider class it has a default functionality implemented which locks he users after a certain unsuccessfull login attempts.
2. Add a cloumn"IsLockedOut" of datatype boolean ,to your user table and while a user attemts to login just count the number of attempts if its a unsucessfull login. When the count gets 3 set IslockedOut column in the table to "true" for that particular user.So even if the user tries to login with correct credentials he wont able to login. So when a user login you will have to check "Username","Password" and "IsLockedOut" in your logic.
If the IsLockedOut flag is false then allow the user to login if his username and password is correct else deny him to login even if other credentials are correct.