AnonymousIdentificationModule.Creating 이벤트

정의

새 익명 식별자를 만들 때 발생합니다.

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 이벤트입니다.

액세스할 수 있습니다 합니다 Creating 의 이벤트를 AnonymousIdentificationModule 라는 서브루틴을 지정 하 여 클래스 AnonymousIdentification_Creating ASP.NET 애플리케이션의 Global.asax 파일에.

사용할 수는 AnonymousID 의 속성을 AnonymousIdentificationEventArgs 개체가 제공를 AnonymousIdentification_Creating 이벤트가 사용자 지정 값으로 익명 식별자를 설정 합니다. 에 대 한 값을 지정 하지 않는 경우는 AnonymousID 중에 속성을 AnonymousIdentification_Creating 이벤트를 Guid 사용 됩니다.

합니다 AnonymousIdentification_Creating 익명 id가 하는 경우에 이벤트 발생 Enabled합니다.

적용 대상