AnonymousIdentificationSection.CookieProtection 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
쿠키를 암호화하는 데 사용되는 암호화 유형을 가져오거나 설정합니다.
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 하나입니다. 기본값은 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)
설명
쿠키 보호를 개선하기 위해 속성을 true.로 설정할 CookieRequireSSL 수도 있습니다.
데이터 유효성 검사와 암호화를 모두 사용하여 쿠키를 보호하려면 이 속성의 기본값을 사용해야 합니다. 이 옵션은 구성된 데이터 유효성 검사 알고리즘을 사용합니다. Triple-DES(3DES)는 암호화에 사용되며, 사용 가능한 경우 키가 충분히 긴 경우(48바이트 이상)