title: How to write a Cross Forest LDAP Query in C#?
body: <p>I'm trying to write an efficient LDAP Query that returns results from another Forest/Domain.  There is not a two-way trust in place.  There are not conditional forwarders in place.  What I do have is a verified network connection, an IP address and a service account and password to use.</p>
  
  <p>This is the basic LDAP code I usually use.</p>
  
  <pre><code>        DirectoryEntry deParent = new DirectoryEntry("LDAPS://000.0.000.00/DC=bob,DC=earl,DC=john,DC=whatever");
          deParent.Username = "Domain\\UserName";
          deParent.Password = "Password";
          deParent.AuthenticationType = AuthenticationTypes.Secure;            
          DirectorySearcher ds = new DirectorySearcher(deParent, qry, columns, SearchScope.Subtree);
  </code></pre>
  
  <p>I know this is a little broad spectrum, but there's a lot of conflicting information out there.  So.</p>
  
  <ol>
  <li>Is a trust REQUIRED to perform a cross forest query?  Query only, no login except for the service account.</li>
  <li>Will a basic DirectoryEntry call like above work?  </li>
  <li>Can anyone please provide an example of a working cross forest query in c#?</li>
  </ol>