共用方式為


PolicyAuthorizationResult.Forbid 方法

定義

多載

Forbid()

表示禁止存取資源。

Forbid(AuthorizationFailure)

表示禁止存取資源。

Forbid()

來源:
PolicyAuthorizationResult.cs
來源:
PolicyAuthorizationResult.cs
來源:
PolicyAuthorizationResult.cs

表示禁止存取資源。

public:
 static Microsoft::AspNetCore::Authorization::Policy::PolicyAuthorizationResult ^ Forbid();
public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Forbid ();
static member Forbid : unit -> Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult
Public Shared Function Forbid () As PolicyAuthorizationResult

傳回

PolicyAuthorizationResult

適用於

Forbid(AuthorizationFailure)

來源:
PolicyAuthorizationResult.cs

表示禁止存取資源。

public:
 static Microsoft::AspNetCore::Authorization::Policy::PolicyAuthorizationResult ^ Forbid(Microsoft::AspNetCore::Authorization::AuthorizationFailure ^ authorizationFailure);
public static Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult Forbid (Microsoft.AspNetCore.Authorization.AuthorizationFailure? authorizationFailure);
static member Forbid : Microsoft.AspNetCore.Authorization.AuthorizationFailure -> Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult
Public Shared Function Forbid (authorizationFailure As AuthorizationFailure) As PolicyAuthorizationResult

參數

authorizationFailure
AuthorizationFailure

指定授權失敗的原因。

傳回

PolicyAuthorizationResult

適用於