Thursday, March 29, 2007

ASP.Net Membership: IsLockedOut property

Hello bloggers!

Today we looked up some info about the ' IsLockedOut ' property of the ASP.Net Membership Control. If a user enters a wrong password more than three times in a row, IsLockedOut will be true. The problem is that a user can't login anymore until an administrator unlock his account.

Password crackers can brute force user accounts. So it can happen you can't login because someone else tried to crack your account with several invalid passwords. To solve this problem, we can just raise the number of maximum invalid attempts.


Well, for those who agree with our statement here are 2 ways to disable it.

Simple Way (and still effective):
Just add the maxInvalidPasswordAttempts property to your web.config file:
example:


Remember, the counter resets when a successful attempt is logged.



Advanced Way (it auto-unlocks your account if you reached the maximum invalid attempts):
Click Here to go to the CodeGuru Tutorial


Changing CSS Styles at runtime
Oh yeah, another quick tip, if you change the css style of a webpage in Visual Studio, you need to Clear your cache before reloading the page. You can do this using CTRL-F5 instead of the normal refresh (F5)

No comments: