AntiforgeryOptions.RequireSsl 屬性

定義

警告

This property is obsolete and will be removed in a future version. The recommended alternative is to set Cookie.SecurePolicy.

這個屬性已過時,未來版本將會移除。 建議的替代方案是在 上 Cookie 設定。

true 相當於 Alwaysfalse 相當於 None

指定反Forgery 系統是否需要 SSL 才能運作。 如果此設定為 'true',且非 SSL 要求進入系統,則所有反交錯 API 都會失敗。

public:
 property bool RequireSsl { bool get(); void set(bool value); };
public bool RequireSsl { get; set; }
[System.Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is to set Cookie.SecurePolicy.")]
public bool RequireSsl { get; set; }
member this.RequireSsl : bool with get, set
[<System.Obsolete("This property is obsolete and will be removed in a future version. The recommended alternative is to set Cookie.SecurePolicy.")>]
member this.RequireSsl : bool with get, set
Public Property RequireSsl As Boolean

屬性值

屬性

適用於