PageConventionCollectionExtensions.AuthorizeAreaFolder 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
AuthorizeAreaFolder(PageConventionCollection, String, String, String) |
Requires authorization with the specified policy for all pages under the specified folder. |
AuthorizeAreaFolder(PageConventionCollection, String, String) |
Requires authorization with the default policy for all pages under the specified folder. |
AuthorizeAreaFolder(PageConventionCollection, String, String, String)
Requires authorization with the specified policy for all pages under the specified folder.
public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeAreaFolder (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string folderPath, string policy);
static member AuthorizeAreaFolder : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * string * string * string -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function AuthorizeAreaFolder (conventions As PageConventionCollection, areaName As String, folderPath As String, policy As String) As PageConventionCollection
Parameters
- conventions
- PageConventionCollection
The PageConventionCollection to configure.
- areaName
- String
The area name.
- folderPath
- String
The folder path e.g. /Manage/
The folder path is the path of the folder, relative to the pages root directory for the specified area.
e.g. the folder path for the file Areas/Identity/Pages/Manage/Accounts.cshtml, is /Manage
.
- policy
- String
The authorization policy.
Returns
Applies to
AuthorizeAreaFolder(PageConventionCollection, String, String)
Requires authorization with the default policy for all pages under the specified folder.
public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeAreaFolder (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string folderPath);
static member AuthorizeAreaFolder : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * string * string -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function AuthorizeAreaFolder (conventions As PageConventionCollection, areaName As String, folderPath As String) As PageConventionCollection
Parameters
- conventions
- PageConventionCollection
The PageConventionCollection to configure.
- areaName
- String
The area name.
- folderPath
- String
The folder path e.g. /Manage/
The folder path is the path of the folder, relative to the pages root directory for the specified area.
e.g. the folder path for the file Areas/Identity/Pages/Manage/Accounts.cshtml, is /Manage
.