WebAuthenticationSuccessAuditEvent クラス
アセンブリ: System.Web (system.web.dll 内)


運用および操作の担当者は、ASP.NET Health Monitoring を使用して、配置されている Web アプリケーションを管理できます。System.Web.Management 名前空間には、アプリケーションの状態データをパッケージ化する状態イベント型、およびそのデータを処理するプロバイダ型が含まれます。また、状態イベント管理を支援するサポート型も含まれます。
次の一覧に、ASP.NET で WebAuthenticationSuccessAuditEvent 型のイベントの生成対象となる機能を示します。
![]() |
---|
既定で、ASP.NET は監査エラーだけをログに記録するよう構成されます。これは、正常終了をログに記録するとシステム リソースが大量に消費されるためです。いつでも、正常終了をログに記録するように設定できます。 |
-
フォームの認証。正常と承認するための条件が監査されます。正常終了した監査結果には、認証されたユーザー名が記録されます。一方、監査がエラーになった場合、復号または検査でエラーになったチケットが原因であることが多く、ユーザー名は記録されません。どちらの場合もクライアントの IP アドレスは記録されます。関連するイベント監査コードは AuditFormsAuthenticationSuccess です。
-
メンバシップ。正常と承認するための条件が監査されます。監査が正常終了した場合もエラーになった場合も、試行したユーザー名が記録されます。どちらの監査フォームにも試行されたパスワードは記録されません。これは、有効なパスワードがログに残らないようにするためです。関連するイベント監査コードは AuditMembershipAuthenticationSuccess です。
WebAuthenticationSuccessAuditEvent が発生すると、既定で Authentication Success Events Raised パフォーマンス カウンタが更新されます。このパフォーマンス カウンタをシステム モニタ (PerfMon) に表示するには、[カウンタの追加] ウィンドウで [パフォーマンス オブジェクト] ドロップダウンリストの [ASP.NET] をクリックし、Authentication Success Events Raised パフォーマンス カウンタを選択して、[追加] ボタンをクリックします。詳細については、MSDN の「Using the System Monitor (PerfMon) with ASP.NET Applications」を参照してください。

次のコード例は 2 つの部分で構成されます。最初が構成ファイルの抜粋で、次が WebAuthenticationSuccessAuditEvent イベントをカスタマイズする方法を示すコードです。
次に示すのは、構成ファイルの provider セクションと eventMappings セクションの抜粋です。これらは既定で設定済みです。構成する必要があるのは、healthMonitoring セクションの rules 要素のセットアップだけです。
<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 イベントのカスタマイズ方法を次のコード例に示します。
Imports System 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 'New ' 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 'New ' 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 'Raise ' 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 'FormatCustomEventDetails End Class 'SampleWebAuthenticationSuccessAuditEvent
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; } } }

System.Web.Management.WebBaseEvent
System.Web.Management.WebManagementEvent
System.Web.Management.WebAuditEvent
System.Web.Management.WebSuccessAuditEvent
System.Web.Management.WebAuthenticationSuccessAuditEvent


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


WebAuthenticationSuccessAuditEvent コンストラクタ (String, Object, Int32, Int32, String)
アセンブリ: System.Web (system.web.dll 内)

Protected Friend Sub New ( _ message As String, _ eventSource As Object, _ eventCode As Integer, _ eventDetailCode As Integer, _ nameToAuthenticate As String _ )
Dim message As String Dim eventSource As Object Dim eventCode As Integer Dim eventDetailCode As Integer Dim nameToAuthenticate As String Dim instance As New WebAuthenticationSuccessAuditEvent(message, eventSource, eventCode, eventDetailCode, nameToAuthenticate)
protected internal WebAuthenticationSuccessAuditEvent ( string message, Object eventSource, int eventCode, int eventDetailCode, string nameToAuthenticate )
protected public: WebAuthenticationSuccessAuditEvent ( String^ message, Object^ eventSource, int eventCode, int eventDetailCode, String^ nameToAuthenticate )
protected WebAuthenticationSuccessAuditEvent ( String message, Object eventSource, int eventCode, int eventDetailCode, String nameToAuthenticate )
protected internal function WebAuthenticationSuccessAuditEvent ( message : String, eventSource : Object, eventCode : int, eventDetailCode : int, nameToAuthenticate : String )

このコンストラクタは、ASP.NET Health Monitoring system によって内部的に使用されます。WebAuthenticationSuccessAuditEvent オブジェクトのインスタンス化には使用しませんが、このクラスを継承する独自のイベント型を実装する場合には呼び出すことができます。
![]() |
---|
WebAuthenticationSuccessAuditEvent コンストラクタは、コードで直接使用するためのものではありません。ASP.NET によって呼び出されます。WebAuthenticationSuccessAuditEvent コンストラクタは、WebAuthenticationSuccessAuditEvent クラスの派生の場合に呼び出すことができます。 |

このコンストラクタをカスタマイズするコードの例を次に示します。
' 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 'New
// 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()); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


WebAuthenticationSuccessAuditEvent コンストラクタ (String, Object, Int32, String)
アセンブリ: System.Web (system.web.dll 内)

Protected Friend Sub New ( _ message As String, _ eventSource As Object, _ eventCode As Integer, _ nameToAuthenticate As String _ )
Dim message As String Dim eventSource As Object Dim eventCode As Integer Dim nameToAuthenticate As String Dim instance As New WebAuthenticationSuccessAuditEvent(message, eventSource, eventCode, nameToAuthenticate)
protected internal WebAuthenticationSuccessAuditEvent ( string message, Object eventSource, int eventCode, string nameToAuthenticate )
protected public: WebAuthenticationSuccessAuditEvent ( String^ message, Object^ eventSource, int eventCode, String^ nameToAuthenticate )
protected WebAuthenticationSuccessAuditEvent ( String message, Object eventSource, int eventCode, String nameToAuthenticate )
protected internal function WebAuthenticationSuccessAuditEvent ( message : String, eventSource : Object, eventCode : int, nameToAuthenticate : String )

このコンストラクタは、ASP.NET Health Monitoring system によって内部的に使用されます。WebAuthenticationSuccessAuditEvent オブジェクトのインスタンス化には使用しませんが、このクラスを継承する独自のイベント型を実装する場合には呼び出すことができます。
![]() |
---|
WebAuthenticationSuccessAuditEvent コンストラクタは、コードで直接使用するためのものではありません。ASP.NET によって呼び出されます。WebAuthenticationSuccessAuditEvent コンストラクタは、WebAuthenticationSuccessAuditEvent クラスの派生の場合に呼び出すことができます。 |

このコンストラクタをカスタマイズするコードの例を次に示します。
' 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 'New
// 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()); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


WebAuthenticationSuccessAuditEvent コンストラクタ

名前 | 説明 |
---|---|
WebAuthenticationSuccessAuditEvent (String, Object, Int32, String) | 指定したパラメータを使用して WebAuthenticationSuccessAuditEvent クラスを初期化します。 |
WebAuthenticationSuccessAuditEvent (String, Object, Int32, Int32, String) | 指定したパラメータを使用して WebSuccessAuditEvent クラスを初期化します。 |

WebAuthenticationSuccessAuditEvent プロパティ

名前 | 説明 | |
---|---|---|
![]() | ApplicationInformation | 監視中の現在のアプリケーションに関する情報を格納している WebApplicationInformation オブジェクトを取得します。 ( WebBaseEvent から継承されます。) |
![]() | EventCode | イベントに関連付けられているコード値を取得します。 ( WebBaseEvent から継承されます。) |
![]() | EventDetailCode | イベント詳細コードを取得します。 ( WebBaseEvent から継承されます。) |
![]() | EventID | イベントに関連付けられている識別子を取得します。 ( WebBaseEvent から継承されます。) |
![]() | EventOccurrence | イベントが発生した回数を表すカウンタを取得します。 ( WebBaseEvent から継承されます。) |
![]() | EventSequence | アプリケーションによるイベントの発生回数を取得します。 ( WebBaseEvent から継承されます。) |
![]() | EventSource | イベントを発生させるオブジェクトを取得します。 ( WebBaseEvent から継承されます。) |
![]() | EventTime | イベントが発生した時刻を取得します。 ( WebBaseEvent から継承されます。) |
![]() | EventTimeUtc | イベントが発生した時刻を取得します。 ( WebBaseEvent から継承されます。) |
![]() | Message | イベントを説明するメッセージを取得します。 ( WebBaseEvent から継承されます。) |
![]() | NameToAuthenticate | 認証済みユーザーの名前を取得します。 |
![]() | ProcessInformation | ASP.NET アプリケーション ホスト プロセスに関する情報を取得します。 ( WebManagementEvent から継承されます。) |
![]() | RequestInformation | Web 要求に関連付けられた情報を取得します。 ( WebAuditEvent から継承されます。) |

WebAuthenticationSuccessAuditEvent メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | FormatCustomEventDetails | イベント情報の標準的な形式を提供します。 ( WebBaseEvent から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | Raise | オーバーロードされます。 WebBaseEvent イベントを発生させ、構成されているプロバイダにこのイベントが発生したことを通知します。 ( WebBaseEvent から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | オーバーロードされます。 イベント情報を表示用に書式設定します。 ( WebBaseEvent から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | IncrementPerfCounters | Audit Success Events Raised パフォーマンス カウンタをインクリメントします。 ( WebSuccessAuditEvent から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

WebAuthenticationSuccessAuditEvent メンバ
WebAuthenticationSuccessAuditEvent データ型で公開されるメンバを以下の表に示します。

名前 | 説明 | |
---|---|---|
![]() | WebAuthenticationSuccessAuditEvent | オーバーロードされます。 WebAuthenticationSuccessAuditEvent クラスの新しいインスタンスを初期化します。 |

名前 | 説明 | |
---|---|---|
![]() | ApplicationInformation | 監視中の現在のアプリケーションに関する情報を格納している WebApplicationInformation オブジェクトを取得します。(WebBaseEvent から継承されます。) |
![]() | EventCode | イベントに関連付けられているコード値を取得します。(WebBaseEvent から継承されます。) |
![]() | EventDetailCode | イベント詳細コードを取得します。(WebBaseEvent から継承されます。) |
![]() | EventID | イベントに関連付けられている識別子を取得します。(WebBaseEvent から継承されます。) |
![]() | EventOccurrence | イベントが発生した回数を表すカウンタを取得します。(WebBaseEvent から継承されます。) |
![]() | EventSequence | アプリケーションによるイベントの発生回数を取得します。(WebBaseEvent から継承されます。) |
![]() | EventSource | イベントを発生させるオブジェクトを取得します。(WebBaseEvent から継承されます。) |
![]() | EventTime | イベントが発生した時刻を取得します。(WebBaseEvent から継承されます。) |
![]() | EventTimeUtc | イベントが発生した時刻を取得します。(WebBaseEvent から継承されます。) |
![]() | Message | イベントを説明するメッセージを取得します。(WebBaseEvent から継承されます。) |
![]() | NameToAuthenticate | 認証済みユーザーの名前を取得します。 |
![]() | ProcessInformation | ASP.NET アプリケーション ホスト プロセスに関する情報を取得します。(WebManagementEvent から継承されます。) |
![]() | RequestInformation | Web 要求に関連付けられた情報を取得します。(WebAuditEvent から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | FormatCustomEventDetails | イベント情報の標準的な形式を提供します。 (WebBaseEvent から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | Raise | オーバーロードされます。 WebBaseEvent イベントを発生させ、構成されているプロバイダにこのイベントが発生したことを通知します。 (WebBaseEvent から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | オーバーロードされます。 イベント情報を表示用に書式設定します。 (WebBaseEvent から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | IncrementPerfCounters | Audit Success Events Raised パフォーマンス カウンタをインクリメントします。 (WebSuccessAuditEvent から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

Weblioに収録されているすべての辞書からWebAuthenticationSuccessAuditEventを検索する場合は、下記のリンクをクリックしてください。

- WebAuthenticationSuccessAuditEventのページへのリンク