Share via


WebAuthenticationSuccessAuditEvent 클래스

정의

성공한 인증 이벤트에 대한 정보를 제공합니다.

public ref class WebAuthenticationSuccessAuditEvent : System::Web::Management::WebSuccessAuditEvent
public class WebAuthenticationSuccessAuditEvent : System.Web.Management.WebSuccessAuditEvent
type WebAuthenticationSuccessAuditEvent = class
    inherit WebSuccessAuditEvent
Public Class WebAuthenticationSuccessAuditEvent
Inherits WebSuccessAuditEvent
상속

예제

이 코드 예제는 두 부분: 사용자 지정 하는 방법을 보여 주는 코드 뒤에 구성 파일 발췌 된 WebAuthenticationSuccessAuditEvent 이벤트입니다.

이 다음은 구성 파일의 일부 providereventMappings 섹션입니다. 이미 기본적으로 설정 됩니다. 하기만 하면 설치 프로그램을 제공 하는 것은 rules 요소에는 healthMonitoring 섹션.

<healthMonitoring  
  enabled="true"  
  heartBeatInterval="0">  

    <providers>  
      // Configure the provider to process   
      // the health events.  
      <add name="EventLogProvider"  
         type="System.Web.Management.EventLogWebEventProvider,  
         System.Web,Version=2.0.3600.0,Culture=neutral,  
         PublicKeyToken=b03f5f7f11d50a3a"/>  
    </providers>  

    <eventMappings>  
       <clear />  
       // Configure the custom event   
       // to handle the audit events.   
        <add name="SampleWebAuthenticationSuccessAuditEvent"   
          type="SamplesAspNet.SampleWebAuthenticationSuccessAuditEvent,  
          webauthsuccessaudit, Version=1.0.1735.23144, Culture=neutral,   
          PublicKeyToken=dd969eda3f3f6ae1, processorArchitecture=MSIL" />  

     </eventMappings>  
     <rules>  
       <clear/>  
       // Establish the connection between custom event   
       // and the provider that must process it.  
      <add name="Log Authentication Success Audits"   
        eventName="SampleWebAuthenticationFailureAuditEvent"  
        provider="EventLogProvider"   
        profile="Custom" />\  
     </rules>  

</healthMonitoring>  

다음 코드에 사용자 지정 하는 방법을 보여 줍니다는 WebAuthenticationSuccessAuditEvent 이벤트입니다.


using System;
using System.Text;
using System.Web;
using System.Web.Management;

namespace SamplesAspNet
{
    // Implements a custom WebAuthenticationSuccessAuditEvent class. 
    public class SampleWebAuthenticationSuccessAuditEvent : 
        System.Web.Management.WebAuthenticationSuccessAuditEvent
    {
        private string customCreatedMsg, customRaisedMsg;

        // Invoked in case of events identified only by their event code.
        public SampleWebAuthenticationSuccessAuditEvent(
            string msg, object eventSource, 
            int eventCode, string userName):
        base(msg, eventSource, eventCode, userName)
        {
            // Perform custom initialization.
            customCreatedMsg =
                string.Format("Event created at: {0}",
                DateTime.Now.TimeOfDay.ToString());
        }

        // Invoked in case of events identified by their event code.and 
        // event detailed code.
        public SampleWebAuthenticationSuccessAuditEvent(
            string msg, object eventSource,
            int eventCode, int detailedCode, string userName):
        base(msg, eventSource, eventCode, detailedCode, userName)
        {
            // Perform custom initialization.
            customCreatedMsg =
            string.Format("Event created at: {0}",
                DateTime.Now.TimeOfDay.ToString());
        }


        // Raises the SampleWebAuthenticationSuccessAuditEvent.
        public override void Raise()
        {
            // Perform custom processing.
            customRaisedMsg =
                string.Format("Event raised at: {0}", 
                DateTime.Now.TimeOfDay.ToString());

            // Raise the event.
            WebBaseEvent.Raise(this);
        }

        // Obtains the current thread information.
        public WebRequestInformation GetRequestInformation()
        {
            // No customization is allowed.
            return RequestInformation;
        }

        //Formats Web request event information.
        //This method is invoked indirectly by the provider 
        //using one of the overloaded ToString methods.
        public override void FormatCustomEventDetails(WebEventFormatter formatter)
        {
            base.FormatCustomEventDetails(formatter);

            // Add custom data.
            formatter.AppendLine("");

            formatter.IndentationLevel += 1;
            formatter.AppendLine(
                "* SampleWebAuthenticationSuccessAuditEvent Start *");
            formatter.AppendLine(string.Format("Request path: {0}",
                RequestInformation.RequestPath));
            formatter.AppendLine(string.Format("Request Url: {0}",
                RequestInformation.RequestUrl));

            // Display custom event timing.
            formatter.AppendLine(customCreatedMsg);
            formatter.AppendLine(customRaisedMsg);

            formatter.AppendLine(
                "* SampleWebAuthenticationSuccessAuditEvent End *");

            formatter.IndentationLevel -= 1;
        }
    }
}
Imports System.Text
Imports System.Web
Imports System.Web.Management


' Implements a custom WebAuthenticationSuccessAuditEvent class. 

Public Class SampleWebAuthenticationSuccessAuditEvent
    Inherits System.Web.Management.WebAuthenticationSuccessAuditEvent
    Private customCreatedMsg, customRaisedMsg As String
    
    
    
    ' Invoked in case of events identified only by their event code.
    Public Sub New(ByVal msg As String, ByVal eventSource _
    As Object, ByVal eventCode As Integer, _
    ByVal userName As String)
        MyBase.New(msg, eventSource, eventCode, userName)
        ' Perform custom initialization.
        customCreatedMsg = _
        String.Format("Event created at: {0}", _
        DateTime.Now.TimeOfDay.ToString())

    End Sub
    
    
    ' Invoked in case of events identified by their event code.and 
    ' event detailed code.
    Public Sub New(ByVal msg As String, _
    ByVal eventSource As Object, _
    ByVal eventCode As Integer, _
    ByVal detailedCode As Integer, _
    ByVal userName As String)
        MyBase.New(msg, eventSource, eventCode, _
        detailedCode, userName)
        ' Perform custom initialization.
        customCreatedMsg = _
        String.Format( _
        "Event created at: {0}", _
        DateTime.Now.TimeOfDay.ToString())

    End Sub
    
    
    
    ' Raises the SampleWebAuthenticationSuccessAuditEvent.
    Public Overrides Sub Raise() 
        ' Perform custom processing.
        customRaisedMsg = String.Format( _
        "Event raised at: {0}", _
        DateTime.Now.TimeOfDay.ToString())
        
        ' Raise the event.
        WebBaseEvent.Raise(Me)
    
    End Sub
    
    
    ' Obtains the current thread information.
    Public Function GetRequestInformation() _
    As WebRequestInformation
        ' No customization is allowed.
        Return RequestInformation

    End Function 'GetRequestInformation
    
    
    'Formats Web request event information.
    'This method is invoked indirectly by the provider 
    'using one of the overloaded ToString methods.
    Public Overrides Sub FormatCustomEventDetails(ByVal formatter _
    As WebEventFormatter)
        MyBase.FormatCustomEventDetails(formatter)

        ' Add custom data.
        formatter.AppendLine("")

        formatter.IndentationLevel += 1
        formatter.AppendLine( _
        "* SampleWebAuthenticationSuccessAuditEvent Start *")
        formatter.AppendLine( _
        String.Format("Request path: {0}", _
        RequestInformation.RequestPath))
        formatter.AppendLine( _
        String.Format("Request Url: {0}", _
        RequestInformation.RequestUrl))

        ' Display custom event timing.
        formatter.AppendLine(customCreatedMsg)
        formatter.AppendLine(customRaisedMsg)

        formatter.AppendLine( _
        "* SampleWebAuthenticationSuccessAuditEvent End *")

        formatter.IndentationLevel -= 1

    End Sub
End Class

설명

ASP.NET 상태 모니터링 프로덕션와 운영 스태프를 배포 된 웹 애플리케이션을 관리할 수 있습니다. System.Web.Management 네임 스페이스 애플리케이션 상태 데이터 및이 데이터 처리를 담당 하는 공급자 형식이 패키징 담당 상태 이벤트 형식을 포함 합니다. 또한 상태 이벤트를 관리 하는 동안 유용한 지 원하는 형식을 포함 합니다.

다음 목록에는 ASP.NET는 형식의 이벤트를 발생 시키는 기능을 설명 WebAuthenticationSuccessAuditEvent합니다.

참고

기본적으로 ASP.NET은 구성 감사 오류 로그에 기록 하면 성공 조건을 심각 하 게 부담을 주어 시스템 리소스입니다. 항상 성공 조건을 기록 하도록 시스템을 구성할 수 있습니다.

  • 폼 인증입니다. 성공 조건 감사 됩니다. 성공 감사에는 인증 된 사용자 이름을 포함 합니다. 대신 실패 감사에서 티켓을 암호 해독 또는 유효성 검사 실패는 일반적으로 발생 하므로 사용자 이름, 포함 되지 않습니다. 두 클라이언트 IP 주소를 포함합니다. 관련된 이벤트 감사 코드는 AuditFormsAuthenticationSuccess합니다.

  • 멤버 자격입니다. 성공 조건 감사 됩니다. 성공 및 실패 감사에 시도한 사용자 이름을 포함 합니다. 모두 형식의 감사 로그에 올바른 암호를 유지 하는 위험이 있으므로 시도 된 암호가 포함 됩니다. 관련된 이벤트 감사 코드는 AuditMembershipAuthenticationSuccess합니다.

경우는 WebAuthenticationSuccessAuditEvent 이 발생 하면 기본적으로 인증 Success Events Raised 성능 카운터를 업데이트 합니다. 시스템 모니터 (PerfMon)에서이 성능 카운터를 보려면 합니다 카운터 추가 창 선택 ASP.NET성능 개체 드롭 다운 목록에서를 인증 Success Events Raised 성능 카운터를 클릭 합니다 추가 단추입니다. 자세한 내용은 ASP.NET 애플리케이션에서 시스템 모니터(PerfMon) 사용을 참조하세요.

참고

대부분의 경우에 구현 된 대로 ASP.NET 상태 모니터링 유형을 사용할 수 없게 됩니다 및에서 값을 지정 하 여 상태 모니터링 시스템을 제어 하는 healthMonitoring 구성 섹션입니다. 사용자 고유의 사용자 지정 이벤트 및 공급자 상태 모니터링 형식에서 파생할 수 있습니다. 파생의 예는 WebBaseEvent 클래스,이 항목에 제공 된 예제를 참조 하세요.

생성자

WebAuthenticationSuccessAuditEvent(String, Object, Int32, Int32, String)

제공된 매개 변수를 사용하여 WebSuccessAuditEvent 클래스를 초기화합니다.

WebAuthenticationSuccessAuditEvent(String, Object, Int32, String)

제공된 매개 변수를 사용하여 WebAuthenticationSuccessAuditEvent 클래스를 초기화합니다.

속성

EventCode

이벤트와 관련된 코드 값을 가져옵니다.

(다음에서 상속됨 WebBaseEvent)
EventDetailCode

이벤트 상세 코드를 가져옵니다.

(다음에서 상속됨 WebBaseEvent)
EventID

이벤트와 연결된 식별자를 가져옵니다.

(다음에서 상속됨 WebBaseEvent)
EventOccurrence

이벤트가 발생한 횟수를 나타내는 카운터를 가져옵니다.

(다음에서 상속됨 WebBaseEvent)
EventSequence

애플리케이션에서 이벤트가 발생한 횟수를 가져옵니다.

(다음에서 상속됨 WebBaseEvent)
EventSource

이벤트를 발생시킨 개체를 가져옵니다.

(다음에서 상속됨 WebBaseEvent)
EventTime

이벤트가 발생한 시간을 가져옵니다.

(다음에서 상속됨 WebBaseEvent)
EventTimeUtc

이벤트가 발생한 시간을 가져옵니다.

(다음에서 상속됨 WebBaseEvent)
Message

이벤트를 설명하는 메시지를 가져옵니다.

(다음에서 상속됨 WebBaseEvent)
NameToAuthenticate

인증된 사용자의 이름을 가져옵니다.

ProcessInformation

ASP.NET 애플리케이션-호스팅 프로세스에 대한 정보를 가져옵니다.

(다음에서 상속됨 WebManagementEvent)
RequestInformation

웹 요청과 연결된 정보를 가져옵니다.

(다음에서 상속됨 WebAuditEvent)

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
FormatCustomEventDetails(WebEventFormatter)

이벤트 정보에 대한 표준 형식을 제공합니다.

(다음에서 상속됨 WebBaseEvent)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
IncrementPerfCounters()

Audit Success Events Raised 성능 카운터를 증가시킵니다.

(다음에서 상속됨 WebSuccessAuditEvent)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
Raise()

이벤트가 발생한 사실을 구성된 공급자에게 알려 이벤트를 발생시킵니다.

(다음에서 상속됨 WebBaseEvent)
ToString()

표시하기 위해 이벤트 정보의 서식을 지정합니다.

(다음에서 상속됨 WebBaseEvent)
ToString(Boolean, Boolean)

표시하기 위해 이벤트 정보의 서식을 지정합니다.

(다음에서 상속됨 WebBaseEvent)

적용 대상

추가 정보