ControllerBase.Unauthorized 方法

定义

重载

Unauthorized(Object)

创建生成 Status401Unauthorized 响应的 UnauthorizedObjectResult

Unauthorized()

创建生成 Status401Unauthorized 响应的 UnauthorizedResult

Unauthorized(Object)

Source:
ControllerBase.cs
Source:
ControllerBase.cs
public:
 virtual Microsoft::AspNetCore::Mvc::UnauthorizedObjectResult ^ Unauthorized(System::Object ^ value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.UnauthorizedObjectResult Unauthorized (object value);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.UnauthorizedObjectResult Unauthorized (object? value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Unauthorized : obj -> Microsoft.AspNetCore.Mvc.UnauthorizedObjectResult
override this.Unauthorized : obj -> Microsoft.AspNetCore.Mvc.UnauthorizedObjectResult
Public Overridable Function Unauthorized (value As Object) As UnauthorizedObjectResult

参数

value
Object

返回

为响应创建的 UnauthorizedObjectResult

属性

适用于

Unauthorized()

Source:
ControllerBase.cs
Source:
ControllerBase.cs
Source:
ControllerBase.cs

创建生成 Status401Unauthorized 响应的 UnauthorizedResult

public:
 virtual Microsoft::AspNetCore::Mvc::UnauthorizedResult ^ Unauthorized();
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.UnauthorizedResult Unauthorized ();
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Unauthorized : unit -> Microsoft.AspNetCore.Mvc.UnauthorizedResult
override this.Unauthorized : unit -> Microsoft.AspNetCore.Mvc.UnauthorizedResult
Public Overridable Function Unauthorized () As UnauthorizedResult

返回

为响应创建的 UnauthorizedResult

属性

适用于