Reputation: 940
We had an issue where network connectivity was lost between trusted domains. Even by just using the sample code (with slight updates) on the documentation for WindowsPrincipal.IsInRole (https://learn.microsoft.com/en-us/dotnet/api/system.security.principal.windowsprincipal.isinrole?view=net-6.0), in .net 6.0 would fail.
For example, lets say you are on DomainName, and have a trust with OtherDomain. Network connectivity is lost between networks that host DomainName vs OtherDomain. Calling:
Console.WriteLine("{0}? {1}.", "Test", myPrincipal.IsInRole("DomainName\\" + "Test"));
on a existing group, specifically in 'our' DomainName (where connectivity still is) fails with the error "The trust relationship between the primary domain and the trusted domain failed".
Only code running .net 6 ran into this issue, all other applications of ours leveraging AD lookups failed over fine. Removing the trust of OtherDomain from DomainName while connectivity was down fixes the issue, but isn't preferred. While this would be expected (because it can't verify that trust), is there no workaround to ignore this and move on, than failing?
Upvotes: 0
Views: 1018