title: LDAP, DirectoryServices c# search base for queries
body: <p>I'm trying to use an LDAP server that has the client login that apparently has to be a simple bind (with a Distinguished Name).</p>
  
  <pre><code>var clientEntry = new DirectoryEntry(
  "LDAP://server.de",
  "cn=medialibrary, ou=special users, dc=uni, dc=de",
  "password",
  AuthenticationTypes.None);
  
  DirectorySearcher directorySearch = new DirectorySearcher(clientEntry, "(cn=searchuser");
  
  SearchResult result = directorySearch.FindOne();
  </code></pre>
  
  <p>The connection via DN works fine. However the search for cn=searchuser returns no users (and no errors).</p>
  
  <p>The user we are trying to search for is in path:</p>
  
  <p>ou=people,dc=uni,dc=de</p>
  
  <p>In the LDAP-Admin utility we can log in using the cn=medialibrary etc DN and if we then modify the search base to 
  "ou=people,dc=uni-potsdam,dc=de"
  and then do the search we find the cn=searchuser entry</p>
  
  <p>The question is what is the equivilent to modifying the search base we can do in that utility in C# code?</p>
  
  <p>(The target user is in a different branch to the default branch given by the directory entry I must originally bind to.)</p>
  
  <p>I believe this original Directory url has been tried and did not work (permissions?)</p>
  
  <p>LDAP://server.de/ou=people,dc=uni,dc=de</p>