Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How User account be locked for 30 min after 5 unsuccessful login attempts with asp.net?

I am using asp.net membership provider for managing users. I have a requirement to lock user accounts for 30 mins after 5 unsuccessful attempts. How should I do that using asp.net membership provider on the server side?

Also I want that 'Passwords should expire after 3 months', 'Last 10 used passwords should be remembered'. Is there any way to solve these requirements.

like image 455
GirishK Avatar asked Nov 13 '22 23:11

GirishK


1 Answers

For the first requirement, the membership provider offers a MaxInvalidPasswordAttempts property which you can use in conjunction with the PasswordAttemptWindow property.

The 2nd requirement to the best of my knowledge would require you to customize the membership provider. The base membership provider does not retain prior passwords or have a forced password reset to my knowledge. This could be done if you create a custom provider yourself however.

Starter material for creating a custom membership provider

like image 83
Khepri Avatar answered Dec 22 '22 00:12

Khepri