AnonymousIdentificationModule.Creating 이벤트
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
새 익명 식별자를 만들 때 발생합니다.
public:
event System::Web::Security::AnonymousIdentificationEventHandler ^ Creating;
public event System.Web.Security.AnonymousIdentificationEventHandler Creating;
member this.Creating : System.Web.Security.AnonymousIdentificationEventHandler
Public Custom Event Creating As AnonymousIdentificationEventHandler
이벤트 유형
예제
다음 코드 예제에서는 AnonymousIdentification_Creating 이벤트를 사용 하 여 사용자 지정 값으로 익명 식별자를 설정 합니다.
public void AnonymousIdentification_Creating(object sender,
AnonymousIdentificationEventArgs args)
{
args.AnonymousID = Samples.AspNet.Security.MyIdClass.GetAnonymousId();
Samples.AspNet.Security.MyIdClass.LogAnonymousId(args.AnonymousID);
}
Public Sub AnonymousIdentification_Creating(sender As Object, _
args As AnonymousIdentificationEventArgs)
args.AnonymousID = Samples.AspNet.Security.MyIdClass.GetAnonymousId()
Samples.AspNet.Security.MyIdClass.LogAnonymousId(args.AnonymousId)
End Sub
설명
이벤트는 Creating 이벤트 중에 발생합니다 PostAuthenticateRequest .
ASP.NET 애플리케이션의 AnonymousIdentificationModule Global.asax 파일에서 AnonymousIdentification_Creating이라는 서브루틴을 지정하여 클래스의 이벤트에 액세스할 Creating 수 있습니다.
AnonymousIdentification_Creating 이벤트에 제공된 개체의 AnonymousIdentificationEventArgs 속성을 사용하여 AnonymousID 익명 식별자를 사용자 지정 값으로 설정할 수 있습니다. AnonymousIdentification_Creating 이벤트 중에 속성 값을 AnonymousID 지정하지 않으면 a Guid 가 사용됩니다.
AnonymousIdentification_Creating 이벤트는 익명 식별이 있는 경우에만 발생합니다Enabled.