title: LDAP Authentication only for Admin account
body: <p>i"ve written code for Active directory LDAP user's authentication . It authenticates all users account in AD, But i want only Administrator account authentication not other user account(see below code). And also find domain name of connecting DNS(refer attached image).</p>
  
  <pre><code>        try
          {
              DirectoryEntry entry = new DirectoryEntry(Domain, UserName, Password);
              object nativeObject = entry.NativeObject;
              Program.fileWrite.WriteLine(DateTime.Now + "\t Login with credentials " + UserName + " and " + Password);
              return true;
          }
          catch (DirectoryServicesCOMException e)
          {
              Program.fileWrite.WriteLine(DateTime.Now + "\t " + e.Message);
              return false;
          }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/VcHCb.jpg" alt="login page"></p>