0

我正在与活动目录交互并执行某些用户操作的网站上工作。我想在服务器离线的情况下处理超时情况。我正在这样编码

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);
4

0 回答 0