Attempt to request LDAP
DirectoryEntry de = new DirectoryEntry();
de.Path = @"dc=xxx,dc=xxx,dc=xxx,dc=edu";
de.AuthenticationType = AuthenticationTypes.Anonymous;
foreach (DirectoryEntry user in de.Children)
{
I get an exception.
I also tried adding "LDAP://"to the path and "cn=users,"the path
The same thing happens with
DirectorySearcher srch = new DirectorySearcher(de);
srch.FindOne();
The exception is
In PresentationFramework.dll the first case of an exception like "System.Windows.Markup.XamlParseException" occurred
Additional information: "A constructor call of type LDAPTest2.MainWindow, which meets the specified binding constraints, made an exception." Line number "3" and line position "9".
We use Open Directory, and I use the same settings with other programs to list users.
EDIT:
As suggested, marc_sI tried the same with System.DirectoryServices.Protocols, but get the same exception onBind()
LdapConnection ldapCon;
ldapCon = new LdapConnection(new LdapDirectoryIdentifier("xxx.xxx.xxx.edu", 389));
ldapCon.AuthType = AuthType.Anonymous;
ldapCon.Bind();