简体   繁体   English

强制DirectoryEntry解除LDAP连接的绑定

[英]Forcing DirectoryEntry to Unbind an LDAP Connection

I'm coding a C# application trying to bind an LDAP server via DirectoryServices.DirectoryEntry. 我正在编写一个C#应用程序,试图通过DirectoryServices.DirectoryEntry绑定LDAP服务器。 There are several DirectoryEntry objects accessing to the server. 有几个DirectoryEntry对象正在访问服务器。 I saw that all of these objects use the same connection on the server (I check it out by TCPViewer and saw only one ldap connection). 我看到所有这些对象在服务器上都使用相同的连接(我通过TCPViewer进行了检出,仅看到一个ldap连接)。 Although I think I'm closing all objects by myDirectoryObject.Close() method, there is still an open connection on the server. 尽管我想通过myDirectoryObject.Close()方法关闭所有对象,但是服务器上仍然存在打开的连接。 Is it possible to force the connection to close the open connection to a server? 是否可以强制连接关闭与服务器的打开的连接?

如果您想在连接级别上进行控制,我认为您应该使用System.DirectoryServices.Protocols

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM