强制 DirectoryEntry 解除 LDAP 连接绑定

发布于 2024-10-09 05:16:23 字数 236 浏览 0 评论 0原文

我正在编写一个 C# 应用程序,尝试通过 DirectoryServices.DirectoryEntry 绑定 LDAP 服务器。有多个 DirectoryEntry 对象访问服务器。我看到所有这些对象都在服务器上使用相同的连接(我通过 TCPViewer 查看并只看到一个 ldap 连接)。尽管我认为我正在通过 myDirectoryObject.Close() 方法关闭所有对象,但服务器上仍然存在打开的连接。是否可以强制连接关闭与服务器的打开连接?

I'm coding a C# application trying to bind an LDAP server via DirectoryServices.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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

灯下孤影 2024-10-16 05:16:23

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

If you want the control at the connection level, I think you should use System.DirectoryServices.Protocols.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文