asp.net

How to use the LoginView Control with Roles in ASP.NET

You can use the LoginView control to display different controls for anonymous and logged-in users by using templates <AnonymousTemplate> and <LoggedInTemplate> which implement this functionality. You can find more information from the article How to use ASP.NET membership LoginView control.

The control supports one additional template that enables you to create different views based on …

Learn more

How to perform authorization checks for Role-Based authorization in ASP.NET in VB.NET

When you enable the roles API, by following the approach described in the article How to use Roles API for Role-Based Authorization in ASP.NET, the RoleManagerModule automatically creates a RolePrincipal instance. This instance contains both the authenticated user’s identity and the roles of the user. The RolePrincipal is a custom implementation of IPrincipal, which is the …

Learn more

How to perform authorization checks for Role-Based authorization in ASP.NET in C#

When you enable the roles API, by following the approach described in the article How to use Roles API for Role-Based Authorization in ASP.NET, the RoleManagerModule automatically creates a RolePrincipal instance. This instance contains both the authenticated user’s identity and the roles of the user. The RolePrincipal is a custom implementation of IPrincipal, which is the …

Learn more

How to configure access rules for Role-Based authorization in ASP.NET

As soon as you have configured users and roles, by following approach described in the article How to create users and roles for Role-Based authorization in ASP.NET, you need to configure the authorization rules for your application. You can establish these rules by configuring the appropriate <authorization> sections in the different directories of your application. You …

Learn more

How to create users and roles for Role-Based authorization in ASP.NET

As soon as you have configured the roles API, by following approach described in the article How to use Roles API for Role-Based Authorization in ASP.NET you can create users and roles and then assign users to these roles using either the WAT or the Roles class in your code. You should click the Create or Manage Roles …

Learn more

The fundamental Roles API classes for Role-Based Authorization in ASP.NET

If you are going to use Role-based authorization in your ASP.NET project you can find more information from the article How to use Roles API for Role-Based Authorization in ASP.NET, and you can use some of the classes which are listed in the next table:

Class name
Description

RoleManagerModule
This module ensures that roles will be assigned to …

Learn more

How to configure roles providers for Role-Based Authorization in ASP.NET

In the article How to use Roles API for Role-Based Authorization in ASP.NET is described a tag <roleManager> as a part of web.config The next table lists the properties you can configure, the roles provider, through the <roleManager> configuration tag:

 

Option

Description

enabled
Indicates whether the roles API is enabled (true) or not (false).

defaultProvider

Learn more

How to use Roles API for Role-Based Authorization in ASP.NET

ASP.NET provides a ready-to-use infrastructure for managing and using roles. This extensible infrastructure Includes prebuilt functionality for managing roles. You can use it to assign roles to users and to access all the role information from your code.

In more detail, the roles infrastructure includes the following:

– A provider-based extensible mechanism for including different types …

Learn more