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

指定防伪造系统是否需要 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

属性值

属性

适用于