O'Reilly logo

Professional ASP.NET 3.5 Security, Membership, and Role Management with C# and VB by Stefan Schackow, Bilal Haidar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

16.2. Supported Functionality

AuthorizationStoreRoleProvider implements all of the methods defined on the base RoleProvider class with the exception of the FindUsersInRole method. The provider throws a NotImplementedException from this method, which is a bit of a deviation from the normal practice of throwing a NotSupportedException for such cases. Because the provider is basically a "shim" that maps RoleProvider method calls to their equivalent for AzMan, and AzMan has no concept of searching for users in a role, the FindUsersInRole method was not implemented.

If you have ever worked with the AzMan APIs directly, you are probably already getting an idea of how the provider makes use of AzMan. Internally, each supported RoleProvider method maps directly to a method call on an AzMan interface or object. The complete mapping is shown in the following list:

  • AddUsersToRolesIAzRole::AddMemberName

  • CreateRole—Either IAzApplication::CreateRole or IAzScope::CreateRole

  • DeleteRole—Either IAzApplication::DeleteRole or IAzScope::DeleteRole

  • FindUsersInRole: Not implemented

  • GetAllRoles: Iterates through the roles returned by either the IAzApplization::Roles property or the IAzScope::Roles property

  • GetRolesForUser: IAzClientContext::GetRoles

  • GetUsersInRole: IAzRole::MembersName

  • IsUserInRole: Retrieves roles from IAzClientContext::GetRoles and then performs a string comparison between the requested role and the set of roles returned from the AzMan method. The comparison is case-insensitive and uses ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required