Partager via


AuthorizeAttribute.HandleUnauthorizedRequest Method

Processes requests that fail authorization.

Namespace:  System.Web.Http
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
Protected Overridable Sub HandleUnauthorizedRequest ( _
    actionContext As HttpActionContext _
)
'Usage
Dim actionContext As HttpActionContext

Me.HandleUnauthorizedRequest(actionContext)
protected virtual void HandleUnauthorizedRequest(
    HttpActionContext actionContext
)
protected:
virtual void HandleUnauthorizedRequest(
    HttpActionContext^ actionContext
)
abstract HandleUnauthorizedRequest : 
        actionContext:HttpActionContext -> unit 
override HandleUnauthorizedRequest : 
        actionContext:HttpActionContext -> unit 
protected function HandleUnauthorizedRequest(
    actionContext : HttpActionContext
)

Parameters

Remarks

This default implementation creates a new response with the Unauthorized status code. Override this method to provide your own handling for unauthorized requests.

See Also

Reference

AuthorizeAttribute Class

System.Web.Http Namespace