Table of Contents

Class ForbiddenObjectResult

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

An Microsoft.AspNetCore.Mvc.ObjectResult that when executed will produce a Forbidden (403) response.

public class ForbiddenObjectResult : ObjectResult, IStatusCodeActionResult, IActionResult
Inheritance
Object
ActionResult
ObjectResult
ForbiddenObjectResult
Implements
IStatusCodeActionResult
IActionResult
Inherited Members
ObjectResult.ExecuteResultAsync(ActionContext)
ObjectResult.OnFormatting(ActionContext)
ObjectResult.Value
ObjectResult.Formatters
ObjectResult.ContentTypes
ObjectResult.DeclaredType
ObjectResult.StatusCode
ActionResult.ExecuteResult(ActionContext)

Constructors

ForbiddenObjectResult(Object, Int32)

Initializes a new instance of the ForbiddenObjectResult class.

public ForbiddenObjectResult(object value, int statusCode = 403)

Parameters

value Object

The value to be returned to the client.

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