.NET Framework Class Library
RoleProvider Class

Defines the contract that ASP.NET implements to provide role-management services using custom role providers.

Namespace:  System.Web.Security
Assembly:  System.Web (in System.Web.dll)
Syntax

Visual Basic (Declaration)
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public MustInherit Class RoleProvider _
    Inherits ProviderBase
Visual Basic (Usage)
Dim instance As RoleProvider
C#
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class RoleProvider : ProviderBase
Visual C++
[AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)]
public ref class RoleProvider abstract : public ProviderBase
JScript
public abstract class RoleProvider extends ProviderBase
Remarks

ASP.NET role management is designed to enable you to easily use a number of different role providers for your ASP.NET applications. You can use the supplied role providers that are included with the .NET Framework, or you can implement your own provider.

When implementing a custom role provider, you are required to inherit the RoleProvider abstract class.

There are two primary reasons for creating a custom role provider.

  • You need to store role information in a data source that is not supported by the role providers included with the .NET Framework, such as a FoxPro database, an Oracle database, or other data sources.

  • You need to manage role information using a database schema that is different from the database schema used by the providers that ship with the .NET Framework. A common example of this would be role data that already exists in a SQL Server database for a company or Web site.

TopicLocation
How to: Sample Role-Provider ImplementationBuilding ASP .NET Web Applications
How to: Sample Role-Provider ImplementationBuilding ASP .NET Web Applications
How to: Sample Role-Provider ImplementationBuilding ASP .NET Web Applications in Visual Studio
How to: Sample Role-Provider ImplementationBuilding ASP .NET Web Applications in Visual Studio
Implementing a Role ProviderBuilding ASP .NET Web Applications
Implementing a Role ProviderBuilding ASP .NET Web Applications
Implementing a Role ProviderBuilding ASP .NET Web Applications in Visual Studio
Implementing a Role ProviderBuilding ASP .NET Web Applications in Visual Studio
.NET Framework Security

Inheritance Hierarchy

System..::.Object
  System.Configuration.Provider..::.ProviderBase
    System.Web.Security..::.RoleProvider
      System.Web.ClientServices.Providers..::.ClientRoleProvider
      System.Web.Security..::.AuthorizationStoreRoleProvider
      System.Web.Security..::.SqlRoleProvider
      System.Web.Security..::.WindowsTokenRoleProvider
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0
See Also

Reference

Other Resources

Tags :


Page view tracker