G
Guest
Hi,
The documentation for RoleProvider.IsUserInRole states:
"The IsUserInRole method is called by the IsUserInRole method of the Roles
class and the IsInRole method of the RolePrincipal class to determine whether
the current logged-on user is associated with a role from the data source for
the configured ApplicationName."
I put breakpoints on every method in my derived custom roleprovider, and
make a call in my webpage to Roles.IsUserInRole. The method GetRolesForUser
is called, while IsUserInRole is not. The runtime seems to take the array of
strings and search the list for the correct role. Why is it doing this extra
work when I created an implimentation to do this myself? Why did I bother to
do this then? When is RoleProvider.IsUserInRole called? Is this a
documentation defect?
-Ben
The documentation for RoleProvider.IsUserInRole states:
"The IsUserInRole method is called by the IsUserInRole method of the Roles
class and the IsInRole method of the RolePrincipal class to determine whether
the current logged-on user is associated with a role from the data source for
the configured ApplicationName."
I put breakpoints on every method in my derived custom roleprovider, and
make a call in my webpage to Roles.IsUserInRole. The method GetRolesForUser
is called, while IsUserInRole is not. The runtime seems to take the array of
strings and search the list for the correct role. Why is it doing this extra
work when I created an implimentation to do this myself? Why did I bother to
do this then? When is RoleProvider.IsUserInRole called? Is this a
documentation defect?
-Ben