PageConventionCollectionExtensions.AuthorizeFolder Method

Definition

Overloads

AuthorizeFolder(PageConventionCollection, String)

Requires authorization for all pages under the specified folder.

AuthorizeFolder(PageConventionCollection, String, String)

Requires authorization for all pages under the specified folder.

AuthorizeFolder(PageConventionCollection, String)

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

Requires authorization for all pages under the specified folder.

C#
public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeFolder (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string folderPath);

Parameters

conventions
PageConventionCollection

The PageConventionCollection to configure.

folderPath
String

The folder path.

Returns

The PageConventionCollection.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

AuthorizeFolder(PageConventionCollection, String, String)

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

Requires authorization for all pages under the specified folder.

C#
public static Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection AuthorizeFolder (this Microsoft.AspNetCore.Mvc.ApplicationModels.PageConventionCollection conventions, string folderPath, string policy);

Parameters

conventions
PageConventionCollection

The PageConventionCollection to configure.

folderPath
String

The folder path.

policy
String

The authorization policy.

Returns

The PageConventionCollection.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0