1

I have an ASP.Net application (on Win2K) that is using Windows authentication and impersonation. We are using the following code to change password:

Dim objDE As DirectoryEntry
'... 
objDE.Invoke("ChangePassword", txtOldPassword, txtNewPassword)

This code works great, except it does not lock the account if there were multiple unsuccessful attempts. Is there any way to make this code to lock the account if incorrect passwords was provided multiple times (as specified in a policy). I can't elevating user privileges, because this potentially makes the system less secure.

4

1 回答 1

1

我不确定普通用户是否有权直接锁定自己的帐户。但是,这样做的一种方法是:

objDE.InvokeSet("IsAccountLocked", true)

有关 Active Directory 上 .NET 的重要资源,请参阅这篇文章

我在 C# 中对上述链接的应用,如果您需要一个好的转换器,请尝试这个

于 2009-04-21T01:55:19.713 回答