Share via


CookieHandler.RequireSsl プロパティ

定義

クッキーは SSL でのみ使用する必要があるかどうかを指定する値を取得または設定します。

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

プロパティ値

クッキーを SSL 接続でのみ使用する場合は true。それ以外の場合は false。 既定値は、true です。

注釈

Set-Cookie ヘッダーの "Secure" フラグが、書き込まれた Cookie に対して出力されるかどうかを制御します。 この値が の true場合、セッション Cookie は HTTPS 経由でのみ使用できます。

このプロパティは、 プロパティに HttpCookie.Secure 対応します。

プロパティは、構成で cookieHandler> 要素に 属性を<指定requireSSLすることで初期化できます。

適用対象