C# failing LDAP queries
- by jpkomick
I'm trying to access an LDAP directory via the SearchRequest object in C#. I can make the same calls via an LDAP library running in and iPhone app, as well as directly via a terminal session. However, the C# queries all seem to fail.
var search = new SearchRequest("ou=calendar,dc=ualberta,dc=ca", "term=*,course=094398,class=*", System.DirectoryServices.Protocols.SearchScope.Subtree, attributeLst);
This returns a list of terms for the course calendar. However, making the following calls won't return results for specific courses
var search = new SearchRequest("ou=calendar,dc=ualberta,dc=ca", "term=1330,course=094398", System.DirectoryServices.Protocols.SearchScope.Subtree, attributeLst);
The attributeLst object has proper attribute names included, but the query always returns with zero results.
Any suggestions anyone has would be greatly appreciated. Thanks.