我正在努力解决这个问题,但我无法使它发挥作用。
问题
我的问题出什么问题了?
代码
private static void ExecuteQuery()
{
string sDomain = "10.12.14.165:389";
string sDefaultOU = "CN=GeneralUsers,CN=Company,DC=Server,DC=LDS,DC=LOCAL";
string sServiceUser = "myUser";
string sServicePassword = "myPassword";
DirectoryEntry ldapEntry = new DirectoryEntry("LDAP://" + sDomain + @"/" + sDefaultOU,
sServiceUser,
sServicePassword);
DirectorySearcher ldapSearcher = new DirectorySearcher(ldapEntry);
//Error Occurs here
SearchResultCollection ldapResult = ldapSearcher.FindAll();
}错误
@ SearchResultCollection ldapResult = ldapSearcher.FindAll(); 异常:服务器上没有这样的对象。
注意
对象确实存在。
发布于 2014-09-16 06:45:23
此问题发生在LDS配置中。与我进行身份验证的用户对LDS没有权限,我使用的查询运行良好。
https://stackoverflow.com/questions/25809526
复制相似问题