Directory Programming .NET

Active Directory and ADAM programming support for .NET developers
Welcome to Directory Programming .NET Sign in | Join | Help
in Search

S.DS.P - Reuse/cache LDAP connections

Last post 09-18-2010, 1:00 AM by dunnry. 1 replies.
Sort Posts: Previous Next
  •  09-07-2010, 12:32 PM 8537

    S.DS.P - Reuse/cache LDAP connections

    Hi,

    As I understand the S.DS.P Namespace dosent reuse/cache LDAP connections, and this is something that developers must make themselves to prevent TCP time_wait connections on a Active Directory server!

    Could you give me some example how you do this? Im relatively new to VB.NET/ASP.NET but i understand C# as well.

    Many people have questions about this topic and i would appreciate if you could help me with this.

    /J
  •  09-18-2010, 1:00 AM 8564 in reply to 8537

    Re: S.DS.P - Reuse/cache LDAP connections

    The LdapConnection class is thread-safe, so you can simply reuse that on requests.  The underlying Request/Reply model is layered on top of this connection.  It is up to you to maintain the connection, which is your 'pooling'.  For ASP.NET, this is harder to do, but for longer running apps (WPF, Services, WebForms, etc.) you just maintain an open connection and operate on it.

    Ryan Dunn
    Extemporaneous Mumblings
    The .NET Developer's Guide to Directory Services Programming
View as RSS news feed in XML