none
"The trust relationship between the primary domain and the trusted domain failed" error when accessing WindowsPrincipal.IsInRole() method RRS feed

  • Question

  • Hi Everyone

    I would appreciate some help on the below scenario

    In our windows authentication based web application, we use WindowsPrincipal.IsInRole() method. 

    After established a two way non transitive trust with an external domain caused the above method to fail with the following error message "The trust relationship between the primary domain and the trusted domain failed". 

    Any pointers why it might think the trust is broken or what I can do to resolve this issue?

    Friday, August 3, 2018 9:45 AM

All replies

  • Try also dump the User.Identity.IsAuthenticated property and see if the user fails to authenticate, or it's trust relationship problem.

    If it's "trust relationship problem" I think you should contact your company's administrators to see what is not set properly, or in case you have nobody to ask, ask in Technet forums.

    • Proposed as answer by Stanly Fan Friday, August 10, 2018 8:41 AM
    Monday, August 6, 2018 1:24 AM
    Answerer
  • Hi pranav.tari,

    Thank you for posting here.

    When I read the WindowsPrincipal.IsInRole in MSDN document. I have noted that its remarks section.

    When testing for newly created role information, such as a new user or a new group, it is important to log out and log in to force the propagation of role information within the domain. Not doing so can cause the IsInRole test to return false. This method is not supported on Windows 98 or Windows Millennium Edition.

    Since we do not know much about your scenario. Just based on your error information, it could be better to provide more details like some code or others.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Stanly Fan Friday, August 10, 2018 8:41 AM
    Tuesday, August 7, 2018 6:22 AM
    Moderator