title: How to provide DirectoryEntry.Exists with credentials?
body: <p>This morning I discovered a nice method (<a href="http://msdn.microsoft.com/en-us/library/system.directoryservices.directoryentry.exists.aspx" rel="noreferrer">DirectoryEntry.Exists</a>), that should be able to check whether an Active Directory object exists on the server. So I tried with a simple:</p>
  
  <pre><code>if (DirectoryEntry.Exists(path)) {}
  </code></pre>
  
  <p>Of course it lacks any overloads to provide credentials with it. Because, if credentials are not provided I get this Exception:</p>
  
  <blockquote>
    <p>Logon failure: unknown user name or
    bad password.
    (System.DirectoryServices.DirectoryServicesCOMException)</p>
  </blockquote>
  
  <p>Is there any other option that gives me the possibility to authenticate my code at the AD server? Or to check the existence of an object?</p>