There appears to be a bug with Global Catalog discovery/error handling in System.DirectoryServices.AccountManagement
If the "first" Global Catalog in an Active Directory site is unavailable, calling System.DirectoryServices.AccountManagement.Principal.GetGroups() results in an error.
There appears to be a bug with Global Catalog discovery/error handling in System.DirectoryServices.AccountManagement
If the "first" Global Catalog in an Active Directory site is unavailable, calling System.DirectoryServices.AccountManagement.Principal.GetGroups() results in an error.
It appears to be related to the code block at https://github.com/dotnet/corefx/blob/a6f76f4f620cbe74821c6445af3f13e048361658/src/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx.cs#L1207-L1215
since it gets all the GCs and tests their names without confirming they're available. If the first one succeeds, it breaks out.
See attached stack trace and rough test code. StackTrace.txt Replication-CSTest.txt