ASP.NET Security Tutorials

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

How to use the PrincipalPermission Class to check authorization in ASP.NET in C#

.NET provides alternative way to enforce role and user rules. Instead of approach described in the article How to use IsInRole method to check authorization in ASP.NET in C#, you can use the PrincipalPermission class from the System.Security.Permissions namespace. You should follow the next steps:

1. Create a PrincipalPermission object that represents the …

Learn more