PageBase.Forbid 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
| Forbid(String[]) | Creates a ForbidResult (Status403Forbidden by default) with the specified authentication schemes. | 
| Forbid() | Creates a ForbidResult (Status403Forbidden by default). | 
| Forbid(AuthenticationProperties) | Creates a ForbidResult (Status403Forbidden by default) with the
specified  | 
| Forbid(AuthenticationProperties, String[]) | Creates a ForbidResult (Status403Forbidden by default) with the
specified authentication schemes and  | 
Forbid(String[])
- Source:
- PageBase.cs
- Source:
- PageBase.cs
- Source:
- PageBase.cs
Creates a ForbidResult (Status403Forbidden by default) with the specified authentication schemes.
public:
 virtual Microsoft::AspNetCore::Mvc::ForbidResult ^ Forbid(... cli::array <System::String ^> ^ authenticationSchemes);public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(params string[] authenticationSchemes);abstract member Forbid : string[] -> Microsoft.AspNetCore.Mvc.ForbidResult
override this.Forbid : string[] -> Microsoft.AspNetCore.Mvc.ForbidResultPublic Overridable Function Forbid (ParamArray authenticationSchemes As String()) As ForbidResultParameters
- authenticationSchemes
- String[]
The authentication schemes to challenge.
Returns
The created ForbidResult for the response.
Remarks
Some authentication schemes, such as cookies, will convert Status403Forbidden to a redirect to show a login page.
Applies to
Forbid()
- Source:
- PageBase.cs
- Source:
- PageBase.cs
- Source:
- PageBase.cs
Creates a ForbidResult (Status403Forbidden by default).
public:
 virtual Microsoft::AspNetCore::Mvc::ForbidResult ^ Forbid();public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid();abstract member Forbid : unit -> Microsoft.AspNetCore.Mvc.ForbidResult
override this.Forbid : unit -> Microsoft.AspNetCore.Mvc.ForbidResultPublic Overridable Function Forbid () As ForbidResultReturns
The created ForbidResult for the response.
Remarks
Some authentication schemes, such as cookies, will convert Status403Forbidden to a redirect to show a login page.
Applies to
Forbid(AuthenticationProperties)
- Source:
- PageBase.cs
- Source:
- PageBase.cs
- Source:
- PageBase.cs
Creates a ForbidResult (Status403Forbidden by default) with the
specified properties.
public:
 virtual Microsoft::AspNetCore::Mvc::ForbidResult ^ Forbid(Microsoft::AspNetCore::Authentication::AuthenticationProperties ^ properties);public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties);abstract member Forbid : Microsoft.AspNetCore.Authentication.AuthenticationProperties -> Microsoft.AspNetCore.Mvc.ForbidResult
override this.Forbid : Microsoft.AspNetCore.Authentication.AuthenticationProperties -> Microsoft.AspNetCore.Mvc.ForbidResultPublic Overridable Function Forbid (properties As AuthenticationProperties) As ForbidResultParameters
- properties
- AuthenticationProperties
AuthenticationProperties used to perform the authentication challenge.
Returns
The created ForbidResult for the response.
Remarks
Some authentication schemes, such as cookies, will convert Status403Forbidden to a redirect to show a login page.
Applies to
Forbid(AuthenticationProperties, String[])
- Source:
- PageBase.cs
- Source:
- PageBase.cs
- Source:
- PageBase.cs
Creates a ForbidResult (Status403Forbidden by default) with the
specified authentication schemes and properties.
public:
 virtual Microsoft::AspNetCore::Mvc::ForbidResult ^ Forbid(Microsoft::AspNetCore::Authentication::AuthenticationProperties ^ properties, ... cli::array <System::String ^> ^ authenticationSchemes);public virtual Microsoft.AspNetCore.Mvc.ForbidResult Forbid(Microsoft.AspNetCore.Authentication.AuthenticationProperties properties, params string[] authenticationSchemes);abstract member Forbid : Microsoft.AspNetCore.Authentication.AuthenticationProperties * string[] -> Microsoft.AspNetCore.Mvc.ForbidResult
override this.Forbid : Microsoft.AspNetCore.Authentication.AuthenticationProperties * string[] -> Microsoft.AspNetCore.Mvc.ForbidResultPublic Overridable Function Forbid (properties As AuthenticationProperties, ParamArray authenticationSchemes As String()) As ForbidResultParameters
- properties
- AuthenticationProperties
AuthenticationProperties used to perform the authentication challenge.
- authenticationSchemes
- String[]
The authentication schemes to challenge.
Returns
The created ForbidResult for the response.
Remarks
Some authentication schemes, such as cookies, will convert Status403Forbidden to a redirect to show a login page.