Problems with IsInRole
From: John Rusk (JohnRusk_at_discussions.microsoft.com)
Date: Tue, 16 Nov 2004 20:41:01 -0800
I'm having problems with WindowsPrincipal.IsInRole. It's returning false
when it should return true.
I've written some test code that uses reflection to call the private
_GetRoles method of WindowsIdentity. That gets the same list of roles that
IsInRole uses. It returns a long list, but most of the strings in the list
are blank (i.e. zero length or null). That explains why IsInRole fails,
since it's doing lookups in a list that consists of (mostly) empty strings.
Does anyone know the cause of this behaviour?