Unable to turn on SecureSocketLayer with DirectoryServices.Protocols.LdapConnection

送分小仙女□ 提交于 2019-12-05 08:48:54

It turns out that the way that the DirectoryServices.Protocols implements it's LDAP calls is by passing them through to a low-level LDAP API. This LDAP API is what is queried when a get is done on the property.

The low-level API is only updated when the methods are executed. You can think about this like it is building command-line arguments for an executable that hasn't been launched yet.

When a call like Bind() is made, then the executable is launched and the properties will report the correct value.

So, just because the property was saying that the value was false, it was using the true when necessary.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!