Enforcing Authorization on Individual Razor Pages

Learn to enforce authorization requirements in Razor Pages.

When using Razor Pages, we can fine-tune the authorization requirements on each individual page. For example, we can enforce specific roles or claims on certain pages. Alternatively, we can grant anonymous access to some pages even when all other pages require authentication.

The following playground demonstrates how page-specific access requirements can be applied in a Razor Pages application:

Get hands-on with 1400+ tech skills courses.