"
ASP.NET (snapshot 2017) Microsoft documentation and samplesThis sample illustrates use of Razor Pages authorization by conventions. This sample demonstrates the features described in the Razor Pages authorization conventions topic.
User authorization in this sample uses the cookie authentication features described in the Using Cookie Authentication without ASP.NET Core Identity topic. For information on using ASP.NET Core Identity, see the topics in the Authentication section of the documentation.
When running the sample, use the email address maria.rodriguez@contoso.com to authenticate the user.
Feature | Description |
---|---|
AuthorizePage | Adds an AuthorizeFilter to the page with the specified path. |
AuthorizeFolder | Adds an AuthorizeFilter to all of the pages in a folder with the specified path. |
AllowAnonymousToPage | Adds an AllowAnonymousFilter to a page with the specified path. |
AllowAnonymousToFolder | Adds an AllowAnonymousFilter to all of the pages in a folder with the specified path. |