Active Directory用户名或密码不正确
使用Active Directory时,我有问题。
我的程序在计算机上运行良好很奇怪,但是当我将其复制到另一台PC时,此错误会出现。
我读了很多有关广告问题的信息,但仍然没有解决方案。请帮助我看看。谢谢
string LDAPPath = "LDAP://xxxxxxx/xxxxxx"; // Sorry I can't show it here
DirectoryEntry entry = new DirectoryEntry(LDAPPath);
DirectorySearcher mySearcher = new DirectorySearcher(entry);
mySearcher.Filter = string.Format("(&(objectClass=group)(sAMAccountName=*))");
mySearcher.PageSize = 5000;
mySearcher.PropertiesToLoad.Add("member");
mySearcher.PropertiesToLoad.Add("name");
SearchResultCollection mysrs = mySearcher.FindAll();
I have a problem when using Active Directory.
It's weird that my program run fine on my computer but when I copy it to another PC, this error shows up.
I read a lot about AD's issues, but still don't have solution. Please help me to take a look. Thank you
string LDAPPath = "LDAP://xxxxxxx/xxxxxx"; // Sorry I can't show it here
DirectoryEntry entry = new DirectoryEntry(LDAPPath);
DirectorySearcher mySearcher = new DirectorySearcher(entry);
mySearcher.Filter = string.Format("(&(objectClass=group)(sAMAccountName=*))");
mySearcher.PageSize = 5000;
mySearcher.PropertiesToLoad.Add("member");
mySearcher.PropertiesToLoad.Add("name");
SearchResultCollection mysrs = mySearcher.FindAll();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此错误说LDAP连接存在问题。
我有一些建议:
directoryentry
。https://serverfault.com/questions/130543/how- can-i-figure-my-ldap-connection-string
This error says that there is a problem with the ldap connection.
I have a couple of suggestions:
DirectoryEntry
.https://serverfault.com/questions/130543/how-can-i-figure-out-my-ldap-connection-string