PageModel.Unauthorized 方法

定义

创建一个 UnauthorizedResult 生成响应的 Status401Unauthorized

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

返回

UnauthorizedResult

UnauthorizedResult为响应创建的。

适用于