UnauthorizedResult Constructor
Namespace: System.Web.Http.Results
Assembly: System.Web.Http (in System.Web.Http.dll)
Overload List
Name | Description | |
---|---|---|
UnauthorizedResult(IEnumerable<AuthenticationHeaderValue>, ApiController) | Initializes a new instance of the UnauthorizedResult class, using a controller. |
|
UnauthorizedResult(IEnumerable<AuthenticationHeaderValue>, HttpRequestMessage) | Initializes a new instance of the UnauthorizedResult class, using a request. |
See Also
UnauthorizedResult Class
System.Web.Http.Results Namespace
Return to top
UnauthorizedResult Constructor (IEnumerable<AuthenticationHeaderValue>, ApiController)
Initializes a new instance of the UnauthorizedResult class, using a controller.
Syntax
public UnauthorizedResult(
IEnumerable<AuthenticationHeaderValue> challenges,
ApiController controller
)
public:
UnauthorizedResult(
IEnumerable<AuthenticationHeaderValue^>^ challenges,
ApiController^ controller
)
new :
challenges:IEnumerable<AuthenticationHeaderValue> *
controller:ApiController -> UnauthorizedResult
Public Sub New (
challenges As IEnumerable(Of AuthenticationHeaderValue),
controller As ApiController
)
Parameters
challenges
Type: System.Collections.Generic.IEnumerable<AuthenticationHeaderValue>The WWW-Authenticate challenges.
controller
Type: System.Web.Http.ApiControllerThe controller from which to obtain the dependencies needed for execution.
Return to top
UnauthorizedResult Constructor (IEnumerable<AuthenticationHeaderValue>, HttpRequestMessage)
Initializes a new instance of the UnauthorizedResult class, using a request.
Syntax
public UnauthorizedResult(
IEnumerable<AuthenticationHeaderValue> challenges,
HttpRequestMessage request
)
public:
UnauthorizedResult(
IEnumerable<AuthenticationHeaderValue^>^ challenges,
HttpRequestMessage^ request
)
new :
challenges:IEnumerable<AuthenticationHeaderValue> *
request:HttpRequestMessage -> UnauthorizedResult
Public Sub New (
challenges As IEnumerable(Of AuthenticationHeaderValue),
request As HttpRequestMessage
)
Parameters
challenges
Type: System.Collections.Generic.IEnumerable<AuthenticationHeaderValue>The WWW-Authenticate challenges.
request
Type: System.Net.Http.HttpRequestMessageThe request message which led to this result.
Return to top