1
我正在使用以下代码使用SSL连接到LDAP服务器。以下代码将只在我关闭SSL标志时才起作用。任何人都可以告诉我我在这里缺少什么来进行SSL连接。我需要提供任何NetworkCredentials
?通过SSL连接时LDAP连接失败
每次的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();
[C#:How to connect to Active Directory with SSL enabled?](http://stackoverflow.com/questions/1228998/c-how-to-connect-to-active-directory-with-ssl - 启用) –
看到其他SO问题 - 我相信你需要使用端口636(而不是389)SSL连接... –