WindowsPrincipal.IsInRole(string) failed if the group name has space RRS feed

  • Question

  • I call WindowsPrincipal.IsInRole(string), it always failed if the group name has space. If the group name has no space, it succeeded

    WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());            
    bool b=wp.IsInRole("Domain\\Group with space");

    Did anybody have the same question before? How to fix it? Thanks

    Tuesday, July 12, 2011 8:38 AM

All replies