C# .NET - Account locked out after three unsuccessful login attempts
Asked By dinesh on 21-Oct-13 12:38 PM
Hi friends,
I am validating a user against the active directory. What i need is the account should be locked for a specific time if there are three unsuccessful login attempts. how to do this using c# code. Please provide step by step process.
With Regards,
Dinesh
Robbe Morris replied to dinesh on 21-Oct-13 02:00 PM
This is an active directory setting on your network that is managed by your system administrator. This can be set at a variety of different levels but is usually a specific policy company wide. So, your code:
https://www.nullskull.com/faq/1774/net-activedirectory-authentication-across-domain-controller.aspx
should fail the validation piece. That said, it is highly unsecure not to use the logon on credentials of the computer.
Having your application accept windows usernames/passwords means that some programmer can put code in their to capture management or executive level employee credentials and take over their accounts on the network. There are legit reasons for this sort of thing but it should be used in extremely rare occasions.