title: How to get distinguishname for OpenLDAP sever
body: <p>I know to get the distinguish name for Active directory server:</p>
  
  <pre><code> DirectoryEntry nRoot = new DirectoryEntry("LDAP://localhost:389");//this for OpenLDAP
   string dnPath = nRoot.Properties["distinguishedName"].Value.ToString();
  </code></pre>
  
  <p>I am getting an error that 'An invalid dn syntax has been specified'</p>
  
  <p>though if try the same code with AD server IP instead of localhost:389 it runs perfectly.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks!</p>