[Mono-dev] System.DirectoryServices and LdapReferralException
JD Conley
jd.conley at coversant.net
Mon Aug 22 00:53:50 EDT 2005
Boris,
> I'm not sure that ignoring the referral result is the correct way to
> solve the problem.
I completely agree.
> - Ensure you're working with the latest SVN version
I am working with the Mono 1.1.8 build, for now. We don't yet have a
build process including Mono so I can't reference the SVN version
without potentially breaking the build for everybody else.
> - Monitor LDAP protocol network activity (for example, using the
> Ethereal http://www.ethereal.com/). Make sure your code get exactly
the
> same result as the same code in .NET (i.e., that both get some, and
the
> same, kind of referral in the result). If this is not the case,
probably
> the problem is in the LDAP request rather than in the way we're
dealing
> with the response.
I'm not actually familiar with LDAP protocol at all. I've just used it
from the API and administrator's perspective. Honestly, I'd prefer not
to learn it. Learning the filter language and dealing with all the
non-standard default schemas out there is painful enough. ;)
> - You're more than welcome to propose the patch (and, the best - also
> the test case) for solving this problem.
I was able to do the search without receiving the referral exception. I
used the following code:
LdapSearchConstraints cons = new LdapSearchConstraints(
new LdapConstraints(this.Timeout, true, null, 0));
LdapSearchResults results =
this.SearchRoot.Connection.Search(
this.SearchRoot.Dn,
(int)this.SearchScope,
this.SearchFilter,
propertiesToLoad,
false,
cons);
However, by using the default SearchConstraints on the LdapConnection
(like I see Mono's System.DirectoryServices is doing) I receive the
LdapReferralException. Attached is a diff to SVN r48643.
Cheers,
JD Conley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DirectorySearcher-r48643.diff
Type: application/octet-stream
Size: 490 bytes
Desc: DirectorySearcher-r48643.diff
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050821/3163f23b/attachment.obj
More information about the Mono-devel-list
mailing list