Table of Contents

Class ForbiddenResult

Namespace
Cuemon.AspNetCore.Mvc
Assembly
Cuemon.AspNetCore.Mvc.dll

An Microsoft.AspNetCore.Mvc.ActionResult that returns a Forbidden (403) response.

public class ForbiddenResult : StatusCodeResult, IClientErrorActionResult, IStatusCodeActionResult, IActionResult
Inheritance
ActionResult
StatusCodeResult
ForbiddenResult
Implements
IClientErrorActionResult
IStatusCodeActionResult
IActionResult
Inherited Members
StatusCodeResult.ExecuteResult(ActionContext)
StatusCodeResult.StatusCode
StatusCodeResult.IStatusCodeActionResult.StatusCode
ActionResult.ExecuteResultAsync(ActionContext)

Constructors

ForbiddenResult(Int32)

Initializes a new instance of the ForbiddenResult class.

public ForbiddenResult(int statusCode = 403)

Parameters

statusCode Int32

The HTTP status code of the response which has to be in the 400-499 range. Default is 403, but for security reasons you may wish to "hide" this with another, e.g., 400, 404 or whatever fits your strategy.

Remarks