我使用以下代码连接到使用SSL的aLDAP服务器。只有当我关闭SSL标志时,以下代码才能工作。有谁能告诉我我在这里缺少什么来做SSL连接吗?我需要提供NetworkCredentials吗?
每次调用findAll时,都会说
服务器无法操作
ldapUrl="LDAP://x500.bund.de:389/l=Neutral,ou=BMI,o=Bund,c=DE";
DirectoryEntry dEntry =null;
// for anonymous login. x500.bund.de supports this.
dEntry = new DirectoryEntry(ldapUrl, null, null,
AuthenticationTypes.SecureSocketsLayer | AuthenticationTypes.Secure);
DirectorySearcher search = new DirectorySearcher(dEntry);
search.Filter = "((objectClass=*))";
search.Filter = searchQuery;
SearchResultCollection scl = search.FindAll();发布于 2011-09-16 23:32:10
389是LDAP明文端口。除非您使用STARTTLS指令并将服务器配置为支持它,否则不能对其使用SSL。按照marc_s的建议,尝试636。
https://stackoverflow.com/questions/7446384
复制相似问题