title: LDAP Connection String
body: <p>I have this LDAP Connection string: <code>connectionString="LDAP://username:password@10.10.10.246:389/DC=ABC,DC=local"</code></p>
  
  <p>Active directory server is <code>ABC.local</code> with IP <code>10.10.10.246</code>.</p>
  
  <p>I am using this code to read properties from active directory:</p>
  
  <pre><code>MembershipSection membershipSection = (MembershipSection)WebConfigurationManager.GetSection("system.web/membership");
      string defaultProvider = membershipSection.DefaultProvider;
  ProviderSettings providerSettings = membershipSection.Providers[defaultProvider];
  string connectionStringName = providerSettings.Parameters["connectionStringName"];
  string connectionString = WebConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString;
  DirectoryEntry ent = new DirectoryEntry(connectionString);
  string name = ent.Properties["l"].Value.ToString();
  string Language = ent.Properties["st"].Value.ToString();
  </code></pre>
  
  <p>but an error appears saying <code>"The server is not operational."</code>. Am I doing anything wrog with connection string or what is happening. an you help me please?</p>