AnonymousIdentificationSection.CookieProtection プロパティ

定義

Cookie の暗号化に使用する暗号化の種類を取得または設定します。

public:
 property System::Web::Security::CookieProtection CookieProtection { System::Web::Security::CookieProtection get(); void set(System::Web::Security::CookieProtection value); };
[System.Configuration.ConfigurationProperty("cookieProtection", DefaultValue=System.Web.Security.CookieProtection.Validation)]
public System.Web.Security.CookieProtection CookieProtection { get; set; }
[<System.Configuration.ConfigurationProperty("cookieProtection", DefaultValue=System.Web.Security.CookieProtection.Validation)>]
member this.CookieProtection : System.Web.Security.CookieProtection with get, set
Public Property CookieProtection As CookieProtection

プロパティ値

CookieProtection値の 1 つ。 既定値は All です。

属性

次のコード例は、 CookieProtection プロパティにアクセスする方法を示しています。

// Get CookieProtection.
System.Web.Security.CookieProtection cookieProtection =
    anonymousIdentificationSection.CookieProtection;
Console.WriteLine("Cookie protection: {0}",
           cookieProtection);
' Get CookieProtection.
Dim cookieProtection _
As System.Web.Security.CookieProtection = _
anonymousIdentificationSection.CookieProtection
Console.WriteLine( _
"Cookie protection: {0}", cookieProtection)

注釈

Cookie の保護を強化するために、 CookieRequireSSL プロパティを true に設定することもできます。

Cookie の保護に役立つデータ検証と暗号化の両方が必要な場合は、このプロパティの既定値を使用してください。 このオプションでは、構成されたデータ検証アルゴリズムが使用されます。 Triple-DES (3DES) は、暗号化に使用されます (使用可能な場合、キーが十分な長さ (48 バイト以上) の場合)。

適用対象