ControllerBase.Unauthorized 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Unauthorized(Object) | |
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。
- 属性