Directory Services, LDAP Path

  • Thread starter Thread starter John
  • Start date Start date
J

John

Does anyone know if there is a way to not use the server name in an LDAP
path statement, like LDAP://SomeServer/... . We have multiple domain
controllers and want the system to get an active domain controller, in the
event one is not available.

John
 
Yes, use server-less binding. Check the MSDN doc's on ADSI for more info.

Willy.
 
Does anyone know if there is a way to not use the server name in an LDAP
path statement, like LDAP://SomeServer/... . We have multiple domain
controllers and want the system to get an active domain controller, in the
event one is not available.

If you run your LDAP queries in a Winforms app environment under an
account that's member of the domain, you do not necessarily need to
specify the server to be used - AD will pick the "best" server for
your query.

DirectoryEntry deUser = new DirectoryEntry("LDAP://cn=John
Doe,cn=Users,dc=fabrikam,dc=com");

This so-called server-less binding doesn't work nicely in ASP.Net and
other hosted environments, though, since you're not running under a
domain account.

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
Back
Top