1
由於某些原因,我無法使用LDS爲在LDS中創建的用戶身份驗證用戶憑據。AD輕型目錄服務未對用戶進行身份驗證
我的測試代碼:
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("[email protected]");
user.GivenName = "ATestUser123";
user.Surname = "SurnameOf";
user.Save();
bool auth = context.ValidateCredentials("MyTestUser", "[email protected]");
ValidateCredentials每次返回false。
LDS正在加入域的Server 2008 R2上運行。我試圖重新創建上下文,過期密碼,通過ADSI手動重置密碼等。
有什麼想法?