title: How to know that Active Directory exists with only ip address?
body: <p>How to know that AD exists?</p>
  
  <p>I have only ip address. I tried to use those methods:</p>
  
  <pre><code>if(DirectoryEntry.Exists("LDAP://192.168.1.1"))
  </code></pre>
  
  <p>also</p>
  
  <pre><code>DirectoryEntry directoryEntry = new DirectoryEntry("LDAP://192.168.1.1")
  </code></pre>
  
  <p>but it didn't help.
  I use LdapConnection right now, but I have a problem</p>
  
  <pre><code>LdapConnection connection = new LdapConnection(new LdapDirectoryIdentifier("192.168.1.1"));
                          connection.AuthType = AuthType.Basic;
                          NetworkCredential credential =
          new NetworkCredential("a", '1");
  
                          connection.Credential = credential;
  
                          connection.Timeout = new TimeSpan(1000);
                          connection.Bind();
  </code></pre>
  
  <p>I'm getting 81 code and The LDAP unavailable.</p>
  
  <p>Does somebody know is possible just to know is ip is correct and AD exists?</p>
  
  <p>P.S. I use .NET 2</p>