title: LDAP query invalid characters
body: <p>I'm getting stuck with formatting an LDAP query against my AD. It appears that the '+' character is messing up my life.</p>
  
  <p>the following query works fine for me:</p>
  
  <pre><code>//C# AD lookup
  
  DirectoryEntry group = new DirectoryEntry(
      "LDAP://mydomain/CN=group name that works,OU=Groups,DC=myDomain,DC=us");
  </code></pre>
  
  <p>but when I attempt to look up a group that has the '+' character in it:</p>
  
  <pre><code>//C# AD Lookup failure with '+' in CN
  
  DirectoryEntry group = new DirectoryEntry(
      "LDAP://mydomain/CN=name+ thatFails,OU=Groups,DC=myDomain,DC=us");
  </code></pre>
  
  <p>I get a 'Invalid dn syntax has been specified' exception.</p>
  
  <p>I've passed a bunch of valid group names with all sorts of 'special' chars suchas '_' and '&amp;' which work. it appears that the '+' character is what is causing my grief. how do I format my CN correctly to make my query valid?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>as suggested, I escaped the '+' char. This unfortunately did not help. below is my current ldap format:</p>
  
  <pre><code>LDAP://mydomain/cn=_bigGroup\+ management office,OU=Groups,DC=myDomain,DC=us
  </code></pre>