Partager via


ApiController.Unauthorized Method

 

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

Overload List

Name Description
System_CAPS_protmethod Unauthorized(AuthenticationHeaderValue[])

Creates an UnauthorizedResult (401 Unauthorized) with the specified values.

System_CAPS_protmethod Unauthorized(IEnumerable<AuthenticationHeaderValue>)

Creates an UnauthorizedResult (401 Unauthorized) with the specified values.

See Also

ApiController Class
System.Web.Http Namespace

Return to top

ApiController.Unauthorized Method (AuthenticationHeaderValue[])

Creates an UnauthorizedResult (401 Unauthorized) with the specified values.

Syntax

protected internal UnauthorizedResult Unauthorized(
    params AuthenticationHeaderValue[] challenges
)
public protected:
UnauthorizedResult^ Unauthorized(
    ... array<AuthenticationHeaderValue^>^ challenges
)
member Unauthorized : 
        [<ParamArrayAttribute>] challenges:AuthenticationHeaderValue[] -> UnauthorizedResult
Protected Friend Function Unauthorized (
    ParamArray challenges As AuthenticationHeaderValue()
) As UnauthorizedResult

Parameters

Return Value

Type: System.Web.Http.Results.UnauthorizedResult

An UnauthorizedResult with the specified values.

Return to top

ApiController.Unauthorized Method (IEnumerable<AuthenticationHeaderValue>)

Creates an UnauthorizedResult (401 Unauthorized) with the specified values.

Syntax

protected internal virtual UnauthorizedResult Unauthorized(
    IEnumerable<AuthenticationHeaderValue> challenges
)
public protected:
virtual UnauthorizedResult^ Unauthorized(
    IEnumerable<AuthenticationHeaderValue^>^ challenges
)
abstract Unauthorized : 
        challenges:IEnumerable<AuthenticationHeaderValue> -> UnauthorizedResult
override Unauthorized : 
        challenges:IEnumerable<AuthenticationHeaderValue> -> UnauthorizedResult
Protected Friend Overridable Function Unauthorized (
    challenges As IEnumerable(Of AuthenticationHeaderValue)
) As UnauthorizedResult

Parameters

Return Value

Type: System.Web.Http.Results.UnauthorizedResult

An UnauthorizedResult with the specified values.

Return to top