Tag: adlds

使用PrincipalContext和ADLDS,LDAP服务器不可用

我们正在利用ADLDS进行用户管理和身份validation。 我们可以毫无问题地成功查询实例。 但是,如果未设置密码,尝试执行SetPassword等操作将失败甚至尝试创建新用户,则会失败。 我可以成功更新用户,只要它不是我想要更新的密码。 我一直在阅读很多与此相关的不同文章,但没有找到解决方案。 发帖看看我是否可以对这个问题有一些新的看法,感谢任何意见。 例 ContextType ctxType = ContextType.ApplicationDirectory; string server = “myadldsserver.com”; string usersCN = “CN=Users,…”; // container where users reside ContextOptions ctxOpts = ContextOptions.SimpleBind; string uname = “myuser”; string pswrd = “mypass”; using(var ctx = new PrincipalContext(ctxType, server, usersCN, ctxOpts, uname, pswrd) using(var newUser = new UserPrincipal(ctx)) { newUser.Name = “newusername”; […]