WebAuthenticationFailureAuditEvent 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
ASP.NET 인증 실패에 대한 정보를 제공합니다.
public ref class WebAuthenticationFailureAuditEvent : System::Web::Management::WebFailureAuditEvent
public class WebAuthenticationFailureAuditEvent : System.Web.Management.WebFailureAuditEvent
type WebAuthenticationFailureAuditEvent = class
inherit WebFailureAuditEvent
Public Class WebAuthenticationFailureAuditEvent
Inherits WebFailureAuditEvent
- 상속
-
WebAuthenticationFailureAuditEvent
예제
다음 코드 예제에서는 클래스를 사용 하는 방법을 보여 있습니다 WebAuthenticationFailureAuditEvent .
using System;
using System.Text;
using System.Web;
using System.Web.Management;
namespace SamplesAspNet
{
// Implements a custom WebAuthenticationFailureAuditEvent class.
public class SampleWebAuthenticationFailureAuditEvent :
System.Web.Management.WebAuthenticationFailureAuditEvent
{
private string customCreatedMsg, customRaisedMsg;
// Invoked in case of events identified only by
// their event code.
public SampleWebAuthenticationFailureAuditEvent(
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 SampleWebAuthenticationFailureAuditEvent(
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 SampleWebAuthenticationFailureAuditEvent.
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(
"* SampleWebAuthenticationFailureAuditEvent 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(
"* SampleWebAuthenticationFailureAuditEvent End *");
formatter.IndentationLevel -= 1;
}
}
}
Imports System.Text
Imports System.Web
Imports System.Web.Management
' Implements a custom WebAuthenticationFailureAuditEvent class.
Public Class SampleWebAuthenticationFailureAuditEvent
Inherits System.Web.Management.WebAuthenticationFailureAuditEvent
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 SampleWebAuthenticationFailureAuditEvent.
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( _
"* SampleWebAuthenticationFailureAuditEvent 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( _
"* SampleWebAuthenticationFailureAuditEvent End *")
formatter.IndentationLevel -= 1
End Sub
End Class
설명
다음 목록에서는 WebAuthenticationFailureAuditEvent 이벤트가 기본적으로 ASP.NET 발생하는 기능에 대해 설명합니다.
메모
로깅 성공 조건이 시스템 리소스에 심각한 부담을 줄 수 있으므로 기본적으로 ASP.NET 감사 실패 조건만 기록하도록 구성됩니다. 성공 조건을 기록하도록 시스템을 항상 구성할 수 있습니다.
폼 인증. 성공 감사에는 인증된 사용자 이름이 포함됩니다. 오류 감사는 일반적으로 암호 해독 또는 유효성 검사에 실패한 티켓으로 인해 발생하므로 사용자 이름을 포함하지 않습니다. 둘 다 클라이언트 IP 주소를 포함합니다. 관련 이벤트 감사 코드는 .입니다 AuditFormsAuthenticationFailure.
멤버십. 성공 및 실패 감사에는 시도된 사용자 이름이 모두 포함됩니다. 어떤 형태의 감사도 로그에 유효한 암호를 유지할 위험이 있으므로 시도한 암호를 포함하지 않습니다. 관련 이벤트 감사 코드는 .입니다 AuditMembershipAuthenticationFailure.
A WebAuthenticationFailureAuditEvent 가 발생하면 기본적으로 감사 인증 실패 이벤트 발생 성능 카운터를 업데이트합니다. 시스템 모니터(PerfMon)에서 이 성능 카운터를 보려면 Add Counters 창의 ASP.NET 개체 드롭다운 목록에서 선택합니다. 사용 실패 이벤트 발생 성능 카운터를 선택하고 Add 단추를 클릭합니다. 자세한 내용은 ASP.NET 애플리케이션과 함께 시스템 모니터(PerfMon) 사용을 참조하세요.
메모
대부분의 경우 구현된 ASP.NET 상태 모니터링 유형을 사용할 수 있으며 healthMonitoring 구성 섹션에서 값을 지정하여 상태 모니터링 시스템을 제어합니다. 상태 모니터링 형식에서 파생하여 고유한 사용자 지정 이벤트 및 공급자를 만들 수도 있습니다. 클래스에서 파생되는 예제는 WebAuthenticationFailureAuditEvent 이 항목에 제공된 예제를 참조하세요.
생성자
| Name | Description |
|---|---|
| WebAuthenticationFailureAuditEvent(String, Object, Int32, Int32, String) |
지정된 이벤트 매개 변수를 사용하여 클래스의 WebAuthenticationFailureAuditEvent 새 인스턴스를 초기화합니다. |
| WebAuthenticationFailureAuditEvent(String, Object, Int32, String) |
지정된 이벤트 매개 변수를 사용하여 클래스의 WebAuthenticationFailureAuditEvent 새 인스턴스를 초기화합니다. |
속성
| Name | Description |
|---|---|
| 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) |
메서드
| Name | Description |
|---|---|
| Equals(Object) |
지정된 개체가 현재 개체와 같은지 여부를 확인합니다. (다음에서 상속됨 Object) |
| FormatCustomEventDetails(WebEventFormatter) |
이벤트 정보의 표준 서식을 제공합니다. (다음에서 상속됨 WebBaseEvent) |
| GetHashCode() |
기본 해시 함수로 사용됩니다. (다음에서 상속됨 Object) |
| GetType() |
현재 인스턴스의 Type 가져옵니다. (다음에서 상속됨 Object) |
| IncrementPerfCounters() |
감사 실패 이벤트가 성능 카운터를 발생 시켰습니다. (다음에서 상속됨 WebFailureAuditEvent) |
| MemberwiseClone() |
현재 Object단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| Raise() |
구성된 공급자에게 이벤트가 발생했음을 알려 이벤트를 발생합니다. (다음에서 상속됨 WebBaseEvent) |
| ToString() |
표시를 위해 이벤트 정보의 형식을 지정합니다. (다음에서 상속됨 WebBaseEvent) |
| ToString(Boolean, Boolean) |
표시를 위해 이벤트 정보의 형식을 지정합니다. (다음에서 상속됨 WebBaseEvent) |