On 2/23/11 12:41 PM, Laporte Sylvain (GIE) wrote:
Thank you,
In deed, our developper is new to querying LDAP with C# and did not
manage to set the BaseDN to anything else than root. C# and Directory Services
classes seem to be quite weird on this side.
Anyway, he tried modifying the scope to base object only and did not
get this exception.
The purpose of the non sense query is that, in this case, we only need
to validate the bind step so we don’t care about searching the whole tree or
retreiving some results.
Why don't you just do a lookup for the rootDSE then ? It's most
certainly the fastest operation, and you don't need to be bound. If you
want to check that a user can bind, then just do a bind.
But we are aware that we are likely to face the problem again in the
furture, when we'll actually have to retreive some information... Then our dev
will have to get through this BaseDN thing.
Usually, you never start searching a directory starting from the
rootDSE, this is not the way to proceed. LDAP defines NamingContexts for
this purpose.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com