PageConventionCollectionExtensions.AuthorizeAreaPage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AuthorizeAreaPage(PageConventionCollection, String, String) |
Requires authorization for the specified area page. |
AuthorizeAreaPage(PageConventionCollection, String, String, String) |
Requires authorization for the specified area page with the specified policy. |
AuthorizeAreaPage(PageConventionCollection, String, String)
Requires authorization for the specified area page.
public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeAreaPage (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string pageName);
static member AuthorizeAreaPage : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * string * string -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function AuthorizeAreaPage (conventions As PageConventionCollection, areaName As String, pageName As String) As PageConventionCollection
Parameters
- conventions
- PageConventionCollection
The PageConventionCollection to configure.
- areaName
- String
The area name.
- pageName
- String
The page name e.g. /Users/List
The page name is the path of the file without extension, relative to the pages root directory for the specified area.
e.g. the page name for the file Areas/Identity/Pages/Manage/Accounts.cshtml, is /Manage/Accounts
.
Returns
Applies to
AuthorizeAreaPage(PageConventionCollection, String, String, String)
Requires authorization for the specified area page with the specified policy.
public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeAreaPage (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string pageName, string policy);
static member AuthorizeAreaPage : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * string * string * string -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function AuthorizeAreaPage (conventions As PageConventionCollection, areaName As String, pageName As String, policy As String) As PageConventionCollection
Parameters
- conventions
- PageConventionCollection
The PageConventionCollection to configure.
- areaName
- String
The area name.
- pageName
- String
The page name e.g. /Users/List
The page name is the path of the file without extension, relative to the pages root directory for the specified area.
e.g. the page name for the file Areas/Identity/Pages/Manage/Accounts.cshtml, is /Manage/Accounts
.
- policy
- String
The authorization policy.