다음을 통해 공유


AnonymousIdentificationSection.Domain 속성

정의

쿠키 도메인을 가져오거나 설정합니다.

public:
 property System::String ^ Domain { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("domain")]
public string Domain { get; set; }
[<System.Configuration.ConfigurationProperty("domain")>]
member this.Domain : string with get, set
Public Property Domain As String

속성 값

쿠키 도메인의 이름입니다. 기본값은 빈 문자열("")입니다.

특성

예제

다음 코드 예제에서는 속성에 액세스 하는 방법을 보여 있습니다 Domain .

// Get Domain.
string domain =
    anonymousIdentificationSection.Domain;
Console.WriteLine("Anonymous identification domain: {0}",
    domain);
' Get Domain.
Dim domain As String = _
anonymousIdentificationSection.Domain
Console.WriteLine( _
"Anonymous identification domain: {0}", domain)

설명

이 특성을 사용하면 공용 DNS 네임스페이스가 있는 도메인(예: "contoso.com"으로 끝나는 모든 사이트)에서 익명 식별 쿠키를 공유할 수 있습니다. 익명 식별 쿠키를 공유하려면 다음 요구 사항을 충족해야 합니다.

  • 쿠키를 공유하려는 사이트에는 일반적인 암호 해독 및 유효성 검사 키가 있어야 합니다.

  • 쿠키 경로 및 쿠키 이름과 같은 다른 익명 ID 구성 특성은 모든 사이트에 대해 동일해야 합니다.

자세한 내용은 클래스를 HttpCookie 참조하세요.

적용 대상

추가 정보