この問題を解決しようとしていますが、これを機能させることができません。
質問
クエリの何が問題になっていますか?
コード
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();
例外:サーバーにそのようなオブジェクトはありません。
注意
オブジェクトは存在します