Reputation: 11
I have a web application that uses Active Directory info via LDAP:
<add name="ADConnectionString" connectionString="LDAP://domain1.com/OU=Users,DC=domain1,DC=com" />
It works fine but when admins put new domain2 into the same forest as domain1 my app fails with the following error:
Server Error in "/" Application.
Unable to obtain DNS hostname of Active Directory domain controller with ntdsa object name "CN=NTDS Settings,CN=SERVERNAME,CN=Servers,CN=Datacenter,CN=Sites,CN=Configuration,DC=domain1,DC=com"
[ActiveDirectoryOperationException: Unable to obtain DNS hostname of Active Directory domain controller with ntdsa object name "CN=NTDS Settings,CN=SERVERNAME,CN=Servers,CN=Datacenter,CN=Sites,CN=Configuration,DC=domain1,DC=com".]
System.DirectoryServices.ActiveDirectory.Utils.GetReplicaList(DirectoryContext context, String partitionName, String siteName, Boolean isDefaultNC, Boolean isADAM, Boolean isGC) +9909
System.DirectoryServices.ActiveDirectory.GlobalCatalog.FindAllInternal(DirectoryContext context, String siteName) +133
System.DirectoryServices.AccountManagement.ADStoreCtx.GetGroupsMemeberOf(Principal p) +1134
Amusingly, SERVERNAME is no longer exists in domain1 (it was removed long time ago), it is in domain2 now. Also, there isn't any data I need (no users info)
Seems like after adding a domain2 my app tries to find any servers that will replicate with it's domain controller, sees SERVERNAME but can't reach it since SERVERNAME has no correct DNS hostname set. I believe that this error will disappear as soon as SERVERNAME has it's DNS hostname (please correct me if I'm wrong) but still there are some questions
Thanks in advance for your answers
Upvotes: 1
Views: 3157
Reputation: 1026
<add name="ADConnectionString" connectionString="LDAP://domain1.com/CN=Users,DC=domain1,DC=com" />
users is common name not OU, to all your queries did you clean up meta data? after removing server
Upvotes: 0