A user of our product came out with a problem which was caused by the DN of Configuration object in AD. We had a rather static lookup method to find Configuration object, thus it failed.

Let's say the domain name of AD is foo.bar.example.com. Therefore, the expected DN of configuration should be CN=Configuration,DC=foo,DC=bar,DC=example,DC=com, right?

But somehow, this user's DN of configuration has one value missing: CN=Configuration,DC=bar,DC=example,DC=com.

Do you know how can we reproduce this issue (or is it commonly implemented?)?


It seems that the root configuration is associated with the bar.example.com domain and foo is just a subdomain. To be sure you can get the configuration distinguished name programatically:

// you may need to specify username/password here as well with another 
// constructor overload.  Try any of the following:
// DirectoryEntry root = new DirectoryEntry("LDAP://RootDSE", user, pwd); 
// DirectoryEntry root = new DirectoryEntry("LDAP://ADServer/RootDSE"); 
// DirectoryEntry root = new DirectoryEntry("LDAP://ADServer/RootDSE", user, pwd); 
DirectoryEntry root = new DirectoryEntry("LDAP://RootDSE"); 

string configDN = root.Properties["configurationNamingContext"].Value.ToString();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy