title: DirectoryEntries.Find: "An invalid dn syntax has been specified"
body: <p>I'm trying to find a user in the current domain. The code is this:</p>
  
  <pre><code>DirectoryEntry domain = new DirectoryEntry("LDAP://CN-Users, DC=" + Environment.UserDomainName);
              DirectoryEntries entries = domain.Children;
              try
              {
                  // The following line causes the exception
                  DirectoryEntry user = entries.Find("(&amp;(objectCategory=user)(cn=" + userName + "))", ActiveDirectoryEntryType.User.TypeName);
                  user.DeleteTree();
                  user.CommitChanges();
              }
              catch
              {}
  </code></pre>
  
  <p>I'm getting an error: </p>
  
  <pre><code>An invalid dn syntax has been specified.
  </code></pre>
  
  <p>I also tried the following code and got the same error:</p>
  
  <pre><code>DirectoryEntry user = entries.Find(userName, ActiveDirectoryEntryType.User.TypeName);
  </code></pre>
  
  <p>I could not find information about the proper syntax in the help files. Does anyone know how this is done?</p>