Aracılığıyla paylaş


AnonymousIdentificationSection.CookieProtection Özellik

Tanım

Tanımlama bilgisini şifrelemek için kullanılan şifreleme türünü alır veya ayarlar.

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

Özellik Değeri

Değerlerden CookieProtection biri. Varsayılan değer All değeridir.

Öznitelikler

Örnekler

Aşağıdaki kod örneği özelliğine nasıl eriş yapılacağını CookieProtection gösterir.

// 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)

Açıklamalar

Tanımlama bilginizin korumasını geliştirmek için özelliğini trueolarak da ayarlamak CookieRequireSSL isteyebilirsiniz.

Tanımlama bilgisinin korunmasına yardımcı olmak için hem veri doğrulama hem de şifreleme istiyorsanız, bu özellik için varsayılan değeri kullandığınızdan emin olun. Bu seçenek, yapılandırılmış veri doğrulama algoritmasını kullanır. Triple-DES (3DES), varsa ve anahtar yeterince uzunsa (48 bayt veya daha fazla) şifreleme için kullanılır.

Şunlara uygulanır