CookieHandlerElement.RequireSsl 屬性

定義

取得或設定值,這個值會指定是否只應搭配 SSL 使用 Cookie。

public:
 property bool RequireSsl { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("requireSsl", DefaultValue=true, IsRequired=false)]
public bool RequireSsl { get; set; }
[<System.Configuration.ConfigurationProperty("requireSsl", DefaultValue=true, IsRequired=false)>]
member this.RequireSsl : bool with get, set
Public Property RequireSsl As Boolean

屬性值

如果 Cookie 只能透過 SSL 連線使用,則為 true,否則為false。 預設為 true

屬性

備註

控制是否針對任何寫入的 Cookie 發出「安全」旗標。 如果此值為 true,則只能透過 HTTPS 使用登入工作階段 Cookie。

表示 requireSSLcookieHandler> 元素的屬性<

適用於

另請參閱