Chapter 15. SqlRoleProvider

Role Manager ships with a number of different providers in the .NET 2.0 and 3.5 Frameworks: WindowsTokenRoleProvider, which was covered at the end of the previous chapter; SqlRoleProvider, which is the topic of this chapter; and AuthorizationStoreRoleProvider, which is discussed in the next chapter. SqlRoleProvider is already configured in machine.config as the default provider for the Role Manager feature. As with SqlMembershipProvider, SqlRoleProvider is the reference provider for the feature because it implements all of the functionality defined on the RoleProvider base class.

This chapter will cover the following areas of the SqlRoleProvider:

  • The database schema used by the SqlRoleProvider.

  • Database security and trust level requirements for the provider, including how to configure the provider for use in partially trusted non-ASP.NET environments.

  • Using the SqlRoleProvider with Windows-authenticated websites.

  • Extending the provider to support "run-with-limited-roles" scenarios.

  • Leveraging role data for authorization checks in the data layer.

  • Supporting multiple applications with a single provider.

  • Managing an application's roles through IIS 7.0.

Get Professional ASP.NET 3.5 Security, Membership, and Role Management with C# and VB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.