title: Why active directory is accessible on port 389 even after SSL is enabled?
body: <p>I basically have three questions here: I need to use .Net 3.5.</p>
  
  <ol>
  <li><p>I have enabled SSL on my active directory. I have exported the certificate and imported on a different machine. Now when I try to access the active directory using port 389, it allows me to connect . Is this an expected behavior?</p></li>
  <li><p>Many places I found to use "LDAPS" in my directory path when using SSL. But when I use this I get Unknown COM Exception. Here on MSDN I found there is nothing such "LDAPS"
  <a href="https://social.msdn.microsoft.com/Forums/vstudio/en-US/723c3908-5806-4515-a5b2-b565e0131a2b/active-directory-connection-ldap-over-ssl" rel="nofollow">https://social.msdn.microsoft.com/Forums/vstudio/en-US/723c3908-5806-4515-a5b2-b565e0131a2b/active-directory-connection-ldap-over-ssl</a></p></li>
  <li><p>Do I really need to provide the domain name before username (domain\user)? I am able to connect without specifying the domain name this way. All I need to provide the FQDN or the name to which the SSL certificate is issued.</p></li>
  </ol>
  
  <p>I am using DirectoryEntry class for my implementation.</p>
  
  <pre><code>string path = "LDAP://hostname:port/SearchBase";
  DirectoryEntry _directoryEntryObj = new DirectoryEntry(path, userName, password);
  if(IsSSL)
      _directoryEntryObj.AuthenticationType = AuthenticationTypes.SecureSocketsLayer;
  object obj = _directoryEntryObj.NativeObject;
  </code></pre>