1

--

我的问题与从以本地用户身份运行的 C# 程序中搜索知名安全主体有关。我似乎无法让它工作。


这是我的代码:

DirectoryEntry root = new DirectoryEntry("LDAP://cn=wellknown security principals,cn=configuration,dc=demoDomain,dc=loc", "domainUser", "HIDDEN");
DirectorySearcher searcher = new DirectorySearcher(root);

// Performing the search
SearchResultCollection results = searcher.FindAll();

IT 以域用户身份运行时工作正常,但以本地用户身份运行时(并使用用户 a domainUser 连接到域)我在尝试 FindAll() 时收到此 COM 异常:“指定的域不存在或无法联系”-2147023541 (8007054B)。

4

0 回答 0