Click here to Skip to main content
12,402,241 members (37,880 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET C#4.0 LDAP
I am working on a website which interact with active directory and perform certain user operations. I want to handle the timeout situation in case of server is offline.
I am coding like this
LdapConnection connection = new LdapConnection(new LdapDirectoryIdentifier(this._domain, Convert.ToInt32(this._port)));
connection.SessionOptions.VerifyServerCertificate = new VerifyServerCertificateCallback((con, cer) => true);
connection.SessionOptions.ProtocolVersion = 3;
connection.AuthType = AuthType.Basic;
connection.SessionOptions.SecureSocketLayer = true;
connection.Timeout = new TimeSpan(0, 0, 10);
Posted 21-Oct-12 20:37pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 22 Oct 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100