C# failing LDAP queries
Posted
by
jpkomick
on Stack Overflow
See other posts from Stack Overflow
or by jpkomick
Published on 2010-12-23T17:51:48Z
Indexed on
2010/12/23
17:54 UTC
Read the original article
Hit count: 290
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.
© Stack Overflow or respective owner