HttpContext.SkipAuthorization 屬性

定義

取得或設定值,指定 UrlAuthorizationModule 物件是否應該略過目前要求的授權檢查。

public:
 property bool SkipAuthorization { bool get(); void set(bool value); };
public bool SkipAuthorization { get; set; }
member this.SkipAuthorization : bool with get, set
Public Property SkipAuthorization As Boolean

屬性值

如果 UrlAuthorizationModule 應該略過授權檢查,則為 true;否則為 false。 預設為 false

備註

屬性 SkipAuthorization 適用于需要重新導向至允許匿名連線之頁面的驗證模組進階使用。 當重新導向至已設定的登入頁面時,表單驗證模組和 Passport 驗證模組都會設定 SkipAuthorization 。 設定 SkipAuthorization 需要 ControlPrincipal 設定旗標。 如需旗標的相關資訊 ControlPrincipal ,請參閱 SecurityPermissionFlag

適用於