Forcing DirectoryEntry to Unbind an LDAP Connection
I'm coding a C# application trying to bind an LDAP server via Di开发者_StackOverflow中文版rectoryServices.DirectoryEntry. There are several DirectoryEntry objects accessing to the server. 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). Although I think I'm closing all objects by myDirectoryObject.Close() method, there is still an open connection on the server. Is it possible to force the connection to close the open connection to a server?
If you want the control at the connection level, I think you should use System.DirectoryServices.Protocols.
精彩评论