共用方式為


PageConventionCollectionExtensions.AllowAnonymousToAreaPage 方法

定義

允許匿名存取位於指定區域中指定名稱的頁面。

public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AllowAnonymousToAreaPage (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string areaName, string pageName);
static member AllowAnonymousToAreaPage : Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection * string * string -> Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection
<Extension()>
Public Function AllowAnonymousToAreaPage (conventions As PageConventionCollection, areaName As String, pageName As String) As PageConventionCollection

參數

areaName
String

區功能變數名稱稱。

pageName
String

頁面名稱,例如 /Users/List

頁面名稱是不含副檔名的檔案路徑,相對於指定區域的 pages 根目錄。 例如,Areas/Identity/Pages/Manage/Accounts.cshtml 檔案的頁面名稱是 /Manage/Accounts

傳回

PageConventionCollection

適用於