I am trying develop an application (C#) to query an LDAP server. I don\'t know the actual server named to query - is there a way to find out using standard windows tools or
AD registers Service Location (SRV) resource records in its DNS server which you can query to get the port and the hostname of the responsible LDAP server in your domain.
Just try this on the command-line:
C:\> nslookup
> set types=all
> _ldap._tcp.<>
_ldap._tcp.<> SRV service location:
priority = 0
weight = 100
port = 389
svr hostname = <>.<>
(provided that your nameserver is the AD nameserver which should be the case for the AD to function properly)
Please see Active Directory SRV Records and Windows 2000 DNS white paper for more information.