【发布时间】:2010-09-07 19:49:38
【问题描述】:
由于某种原因,我无法使用 LDS 为在 LDS 中创建的用户验证用户凭据。
我的测试代码是:
PrincipalContext context = new PrincipalContext(ContextType.ApplicationDirectory, "adlds:50000", "CN=test,DC=test,DC=internal", ContextOptions.Negotiate);
UserPrincipal user = new UserPrincipal(context);
user.Enabled = true;
user.Name = "MyTestUser";
user.SetPassword("P@ssw0rd1");
user.GivenName = "ATestUser123";
user.Surname = "SurnameOf";
user.Save();
bool auth = context.ValidateCredentials("MyTestUser", "P@ssw0rd1");
ValidateCredentials 每次都返回 false。
LDS 在已加入域的 Server 2008 R2 上运行。我尝试过重新创建上下文、过期密码、通过 ADSI 手动重置密码等。
有什么想法吗?
【问题讨论】:
标签: authentication active-directory