AD中configuration的可分辨名称是否被篡改?

我们产品的用户出现了一个由AD中Configuration对象的DN引起的问题。 我们有一个相当静态的查找方法来查找configuration对象,因此失败了。

假设AD的域名是foo.bar.example.com 。 因此,configuration的期望DN应该是CN=Configuration,DC=foo,DC=bar,DC=example,DC=com ,对吗?

但不知何故,这个用户的DNconfiguration有一个值缺失: CN=Configuration,DC=bar,DC=example,DC=com

你知道我们怎么能重现这个问题(或者它是否被普遍实施?)?

看起来,根configuration与bar.example.com域相关联,foo只是一个子域。 要确定你可以通过编程获得configuration专有名称:

 // 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();