You're staring at 0x000020DC — that weird error that stops replication or demotion cold. It's frustrating because the error message is vague. The good news: the fix is straightforward once you know what's missing.
The Fix: Add the missing cross-reference
What's actually happening here is Active Directory can't find a crossRef object for a naming context (NC). Every NC in your forest needs a cross-reference in the Configuration partition under CN=Partitions,CN=Configuration,DC=ForestDnsZones,.... When that entry is missing — usually from a botched domain promotion or an incomplete metadata cleanup — you get this error.
You have two ways to fix it. I'll show both, but I recommend ADSI Edit for most people — it's less error-prone.
Method 1: ADSI Edit (easier)
- Open ADSI Edit (install via Server Manager if you haven't — it's in Remote Server Administration Tools > AD DS and AD LDS Tools).
- Right-click ADSI Edit in the top-left pane, choose Connect to.
- In the dialog, set Select a well-known Naming Context to Configuration. Click OK.
- Navigate to:
CN=Partitions,CN=Configuration,DC=yourdomain,DC=com - Right-click the CN=Partitions container, choose New > Object.
- Select
crossRefas the class. Click Next. - Set the CN (Common Name) value — this should be the DNS name of the missing NC, like
DC=Subdomain,DC=yourdomain,DC=com. - Set the nCName attribute to the full distinguished name of the NC, e.g.,
DC=Subdomain,DC=yourdomain,DC=com. - Set dnsRoot to the DNS name of the domain controller that hosts this NC (optional but helpful for replication).
- Click Finish.
That's it. The error should clear once replication picks up the change. Force replication with repadmin /syncall /AdeP if you're impatient.
Method 2: NTDSUTIL (for the command-line diehards)
If you're working remotely or batch-processing servers, NTDSUTIL works too. Open an elevated command prompt and run:
ntdsutil
metadata cleanup
connections
connect to server DC01.yourdomain.com
quit
select operation target
list domains
select domain 0 # or whichever index matches your missing NC
list naming context
q
q
q
Wait — that's for deletion, not addition. NTDSUTIL doesn't have an easy command to add a cross-reference. You'd need to use LDAP operations via ldifde. The simplest way is ADSI Edit.
Why this fix works
The core issue: Active Directory uses the crossRef objects under CN=Partitions to map naming contexts to their host domain controllers. When a domain controller tries to replicate a naming context — like CN=Schema,CN=Configuration,DC=ForestDnsZones or a user-defined application partition — it looks up the cross-reference to know which server to contact. If the cross-reference is missing, replication fails with 0x000020DC.
This usually happens after a domain controller is forcibly removed (metadata cleanup was done poorly) or when an application partition wasn't properly registered. The fix manually creates that registry of where the NC lives.
Less common variations of the same issue
Sometimes the cross-reference exists but points to the wrong server. Check the dnsRoot attribute on the crossRef — if that server is dead or unreachable, you'll get 0x000020DC too. The fix here is to update dnsRoot to a working domain controller.
Another variation: the cross-reference exists, but its nCName attribute is blank or has a typo. Open the object in ADSI Edit and verify the nCName matches the exact distinguished name of your naming context. Even a trailing space breaks it.
I've also seen this error when the CN=Partitions container itself is missing — usually from a partial Active Directory corruption. In that case, you're looking at a forest recovery situation, not a simple cross-reference add.
Prevention
Never skip proper metadata cleanup when demoting a domain controller or removing an application partition. Always use Server Manager or ntdsutil metadata cleanup to remove the server's references. If you're removing an application partition, use ntdsutil domain management delete nc — that deletes the cross-reference cleanly.
Enable auditing of directory service changes via Group Policy (DS Access subcategory) so you can see who deletes or modifies cross-references. This won't prevent the error, but it'll tell you who to yell at.
Finally, back up your Configuration partition regularly. Restoring a single crossRef object from backup is much easier than recreating it blind.