Guys I have a simple customer login page in ASP.net (C#) which has 2 textboxes and a button, one for username and the other for password and button for submit.
Upon pressing submit, the password textbox text is encrypted and then compared with the encrypted value of password already stored in DB.
Now what I want to do is, upon each unsuccessful login attempt, it should display a message like "x tries remaining out of 5". When all 5 tries are used, it should ban the user's ip for 1 hour.
How should I approach this? I am pretty new to ASP so I have no idea on how to get user IP and then block it for 1 hour. After 1 hour has passed, the ip should be unblocked automatically.
Any help will be appreciated.
P.S I am not looking for anything much complicated. I am new to this so something complicated will not be in my grasp.