共用方式為


PageConventionCollectionExtensions.AuthorizeAreaFolder 方法

定義

多載

AuthorizeAreaFolder(PageConventionCollection, String, String, String)

針對指定資料夾下的所有頁面,都需要具有指定原則的授權。

AuthorizeAreaFolder(PageConventionCollection, String, String)

需要具有指定資料夾下所有頁面之預設原則的授權。

AuthorizeAreaFolder(PageConventionCollection, String, String, String)

來源:
PageConventionCollectionExtensions.cs
來源:
PageConventionCollectionExtensions.cs
來源:
PageConventionCollectionExtensions.cs

針對指定資料夾下的所有頁面,都需要具有指定原則的授權。

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

參數

areaName
String

區功能變數名稱稱。

folderPath
String

資料夾路徑,例如 /Manage/

資料夾路徑是資料夾的路徑,相對於指定區域的 pages 根目錄。 例如,Areas/Identity/Pages/Manage/Accounts.cshtml 檔案的資料夾路徑是 /Manage

policy
String

授權原則。

傳回

PageConventionCollection

適用於

AuthorizeAreaFolder(PageConventionCollection, String, String)

來源:
PageConventionCollectionExtensions.cs
來源:
PageConventionCollectionExtensions.cs
來源:
PageConventionCollectionExtensions.cs

需要具有指定資料夾下所有頁面之預設原則的授權。

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

參數

areaName
String

區功能變數名稱稱。

folderPath
String

資料夾路徑,例如 /Manage/

資料夾路徑是資料夾的路徑,相對於指定區域的 pages 根目錄。 例如,Areas/Identity/Pages/Manage/Accounts.cshtml 檔案的資料夾路徑是 /Manage

傳回

PageConventionCollection

適用於