Share via


AnonymousIdentificationSection.CookieProtection プロパティ

定義

クッキーの暗号化に使用される暗号化タイプを取得または設定します。

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

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)

注釈

クッキーの保護を向上させるために、プロパティtrueCookieRequireSSL .

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

適用対象