title: Block User IP after 5 unsuccessful login attempts?
body: <p>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.</p>
  
  <p>Upon pressing submit, the password textbox text is encrypted and then compared with the encrypted value of password already stored in DB. </p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Any help will be appreciated. </p>
  
  <p>P.S I am not looking for anything much complicated. I am new to this so something complicated will not be in my grasp.</p>