public DsmlSoapHttpConnection(DsmlDirectoryIdentifier identifier)
 {
     this.dsmlSoapAction = "\"#batchRequest\"";
     this.dsmlAuthType = System.DirectoryServices.Protocols.AuthType.Negotiate;
     if (identifier == null)
     {
         throw new ArgumentNullException("identifier");
     }
     base.directoryIdentifier = identifier;
     this.dsmlHttpConnection = (HttpWebRequest) WebRequest.Create(((DsmlDirectoryIdentifier) base.directoryIdentifier).ServerUri);
     Hashtable table = new Hashtable();
     this.httpConnectionTable = Hashtable.Synchronized(table);
 }
        public DsmlSoapHttpConnection(DsmlDirectoryIdentifier identifier)
        {
            this.dsmlSoapAction = "\"#batchRequest\"";
            this.dsmlAuthType   = System.DirectoryServices.Protocols.AuthType.Negotiate;
            if (identifier == null)
            {
                throw new ArgumentNullException("identifier");
            }
            base.directoryIdentifier = identifier;
            this.dsmlHttpConnection  = (HttpWebRequest)WebRequest.Create(((DsmlDirectoryIdentifier)base.directoryIdentifier).ServerUri);
            Hashtable table = new Hashtable();

            this.httpConnectionTable = Hashtable.Synchronized(table);
        }
 public LdapConnection(LdapDirectoryIdentifier identifier, NetworkCredential credential, System.DirectoryServices.Protocols.AuthType authType)
 {
     this.connectionAuthType = System.DirectoryServices.Protocols.AuthType.Negotiate;
     this.ldapHandle = IntPtr.Zero;
     this.automaticBind = true;
     this.needDispose = true;
     this.fd = new GetLdapResponseCallback(this.ConstructResponse);
     base.directoryIdentifier = identifier;
     base.directoryCredential = (credential != null) ? new NetworkCredential(credential.UserName, credential.Password, credential.Domain) : null;
     this.connectionAuthType = authType;
     if ((authType < System.DirectoryServices.Protocols.AuthType.Anonymous) || (authType > System.DirectoryServices.Protocols.AuthType.Kerberos))
     {
         throw new InvalidEnumArgumentException("authType", (int) authType, typeof(System.DirectoryServices.Protocols.AuthType));
     }
     if (((this.AuthType == System.DirectoryServices.Protocols.AuthType.Anonymous) && (base.directoryCredential != null)) && (((base.directoryCredential.Password != null) && (base.directoryCredential.Password.Length != 0)) || ((base.directoryCredential.UserName != null) && (base.directoryCredential.UserName.Length != 0))))
     {
         throw new ArgumentException(System.DirectoryServices.Protocols.Res.GetString("InvalidAuthCredential"));
     }
     this.Init();
     this.options = new LdapSessionOptions(this);
     this.clientCertificateRoutine = new QUERYCLIENTCERT(this.ProcessClientCertificate);
 }
 public DsmlSoapHttpConnection(DsmlDirectoryIdentifier identifier, NetworkCredential credential, System.DirectoryServices.Protocols.AuthType authType) : this(identifier, credential)
 {
     this.AuthType = authType;
 }
 internal LdapConnection(LdapDirectoryIdentifier identifier, NetworkCredential credential, System.DirectoryServices.Protocols.AuthType authType, IntPtr handle)
 {
     this.connectionAuthType = System.DirectoryServices.Protocols.AuthType.Negotiate;
     this.ldapHandle = IntPtr.Zero;
     this.automaticBind = true;
     this.needDispose = true;
     base.directoryIdentifier = identifier;
     this.ldapHandle = handle;
     base.directoryCredential = credential;
     this.connectionAuthType = authType;
     this.options = new LdapSessionOptions(this);
     this.needDispose = false;
     this.clientCertificateRoutine = new QUERYCLIENTCERT(this.ProcessClientCertificate);
 }