PageConventionCollectionExtensions.AuthorizeAreaPage 方法

定义

重载

AuthorizeAreaPage(PageConventionCollection, String, String)

需要指定区域页的授权。

AuthorizeAreaPage(PageConventionCollection, String, String, String)

需要对具有指定策略的指定区域页进行授权。

AuthorizeAreaPage(PageConventionCollection, String, String)

Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs

需要指定区域页的授权。

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

参数

areaName
String

区域名称。

pageName
String

页面名称,例如 /Users/List

页面名称是没有扩展名的文件的路径,相对于指定区域的页根目录。 例如,文件 Areas/Identity/Pages/Manage/Accounts.cshtml 的页面名称为 /Manage/Accounts

返回

PageConventionCollection

适用于

AuthorizeAreaPage(PageConventionCollection, String, String, String)

Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs
Source:
PageConventionCollectionExtensions.cs

需要对具有指定策略的指定区域页进行授权。

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

参数

areaName
String

区域名称。

pageName
String

页面名称,例如 /Users/List

页面名称是没有扩展名的文件的路径,相对于指定区域的页根目录。 例如,文件 Areas/Identity/Pages/Manage/Accounts.cshtml 的页面名称为 /Manage/Accounts

policy
String

授权策略。

返回

PageConventionCollection

适用于