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


運用および操作の担当者は、ASP.NET Health Monitoring を使用して、配置されている Web アプリケーションを管理できます。System.Web.Management 名前空間には、アプリケーションの状態データをパッケージ化する状態イベント型、およびそのデータを処理するプロバイダ型が含まれます。また、状態イベント管理を支援するサポート型も含まれます。
WebFailureAuditEvent クラスは、セキュリティ操作が失敗すると使用されます。たとえば、Web 要求に対する URL 承認が失敗した場合です。
既定では、ASP.NET は次の機能について WebFailureAuditEvent イベントを発生させるよう構成されています。
-
ファイルの承認。ASP.NET では、ファイルの承認を Windows ID が要求に関連付けられている場合にだけ実施します。関連するイベント監査コードは AuditFileAuthorizationFailure です。
-
URL の承認。URL リソースに対する承認されていないアクセスを制御します。匿名ユーザーによる試行の失敗は監査されません。一般的な環境では、匿名ユーザーの認証エラーは許容されるからです。関連するイベント監査コードは AuditUrlAuthorizationFailure です。
-
汎用未処理状態またはセキュリティ未処理状態。次の一覧に、これらの条件に関連するイベント コードを示します。
-
AuditFormsAuthenticationFailure
-
AuditMembershipAuthenticationFailure
-
AuditInvalidViewStateFailure
-
AuditUnhandledSecurityException
-
AuditUnhandledAccessException
-
WebFailureAuditEvent イベントが発生すると、ASP.NET Health Monitoring は関連する Audit Failure Events Raised パフォーマンス カウンタをインクリメントし、healthMonitoring 構成をチェックしてそのイベントをサブスクライブするプロバイダがあるかどうかを確認します。このイベントをサブスクライブするプロバイダがある場合、ASP.NET はそのイベントをディスパッチして処理させます。
![]() |
---|
Audit Failure Events Raised パフォーマンス カウンタをシステム モニタ (PerfMon) に表示するには、[カウンタの追加] ウィンドウで [パフォーマンス オブジェクト] ドロップダウンリストの [ASP.NET] を選択し、[Audit Failure Events Raised] パフォーマンス カウンタを選択して、[追加] ボタンをクリックします。詳細については、MSDN の IIS に関するドキュメントの「Using the System Monitor (PerfMon) with ASP.NET Applications」を参照してください。メモ ほとんどの場合、ASP.NET 状態監視型は実装のまま使用でき、healthMonitoring 構成セクションに値を指定して ASP.NET Health Monitoring system を制御できます。状態監視型の派生として独自のイベントおよびプロバイダを作成することもできます。WebFailureAuditEvent クラスの派生の例については、このトピックの例を参照してください。 |

WebFailureAuditEvent クラスの派生としてカスタム監査イベントを作成する方法を次のコード例に示します。
Imports System Imports System.Text Imports System.Web Imports System.Web.Management ' Implements a custom WebFailureAuditEvent class. Public Class SampleWebFailureAuditEvent Inherits System.Web.Management.WebFailureAuditEvent 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) MyBase.New(msg, eventSource, eventCode) ' 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) MyBase.New(msg, eventSource, eventCode, detailedCode) ' Perform custom initialization. customCreatedMsg = String.Format("Event created at: {0}", _ DateTime.Now.TimeOfDay.ToString()) End Sub 'New ' Raises the SampleWebFailureAuditEvent. 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("******** SampleWebFailureAuditEvent 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("******** SampleWebFailureAuditEvent End ********") formatter.IndentationLevel -= 1 End Sub 'FormatCustomEventDetails End Class 'SampleWebFailureAuditEvent
using System; using System.Text; using System.Web; using System.Web.Management; namespace SamplesAspNet { // Implements a custom WebFailureAuditEvent class. public class SampleWebFailureAuditEvent : System.Web.Management.WebFailureAuditEvent { private string customCreatedMsg, customRaisedMsg; // Invoked in case of events identified only by their event code. public SampleWebFailureAuditEvent(string msg, object eventSource, int eventCode): base(msg, eventSource, eventCode) { // 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 SampleWebFailureAuditEvent(string msg, object eventSource, int eventCode, int detailedCode): base(msg, eventSource, eventCode, detailedCode) { // Perform custom initialization. customCreatedMsg = string.Format("Event created at: {0}", DateTime.Now.TimeOfDay.ToString()); } // Raises the SampleWebFailureAuditEvent. 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( "******** SampleWebFailureAuditEvent 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( "******** SampleWebFailureAuditEvent End ********"); formatter.IndentationLevel -= 1; } } }
次に示すのは、ASP.NET で WebFailureAuditEvent イベントを使用できるようにする方法を示す構成の抜粋です。
<healthMonitoring
<providers>
<eventMappings>
<rules>
</healthMonitoring>

System.Web.Management.WebBaseEvent
System.Web.Management.WebManagementEvent
System.Web.Management.WebAuditEvent
System.Web.Management.WebFailureAuditEvent
System.Web.Management.WebAuthenticationFailureAuditEvent
System.Web.Management.WebViewStateFailureAuditEvent


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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

Dim message As String Dim eventSource As Object Dim eventCode As Integer Dim instance As New WebFailureAuditEvent(message, eventSource, eventCode)
protected internal function WebFailureAuditEvent ( message : String, eventSource : Object, eventCode : int )

このコンストラクタは、ASP.NET Health Monitoring system によって内部的に使用されます。WebFailureAuditEvent オブジェクトのインスタンス化には使用しませんが、このクラスを継承する独自のイベント型を実装する場合には呼び出すことができます。

このコンストラクタを SampleWebFailureAuditEvent クラスで呼び出す方法を次のコード例に示します。このコード例は、WebFailureAuditEvent クラスのトピックで取り上げているコード例の一部分です。
' 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) MyBase.New(msg, eventSource, eventCode) ' 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 SampleWebFailureAuditEvent(string msg, object eventSource, int eventCode): base(msg, eventSource, eventCode) { // 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


WebFailureAuditEvent コンストラクタ

名前 | 説明 |
---|---|
WebFailureAuditEvent (String, Object, Int32) | 指定されたパラメータを使用して、WebFailureAuditEvent クラスの新しいインスタンスを初期化します。 |
WebFailureAuditEvent (String, Object, Int32, Int32) | 指定されたパラメータを使用して、WebFailureAuditEvent クラスの新しいインスタンスを初期化します。 |

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

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

このコンストラクタは、ASP.NET Health Monitoring system によって内部的に使用されます。WebFailureAuditEvent オブジェクトのインスタンス化には使用しませんが、このクラスを継承する独自のイベント型を実装する場合には呼び出すことができます。

このコンストラクタを SampleWebFailureAuditEvent クラスで呼び出す方法を次のコード例に示します。このコード例は、WebFailureAuditEvent クラスのトピックで取り上げているコード例の一部分です。
' 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) MyBase.New(msg, eventSource, eventCode, detailedCode) ' 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 SampleWebFailureAuditEvent(string msg, object eventSource, int eventCode, int detailedCode): base(msg, eventSource, eventCode, detailedCode) { // 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


WebFailureAuditEvent プロパティ

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

WebFailureAuditEvent メソッド

名前 | 説明 | |
---|---|---|
![]() | 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 Failure Events Raised パフォーマンス カウンタをインクリメントします。 |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

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


名前 | 説明 | |
---|---|---|
![]() | ApplicationInformation | 監視中の現在のアプリケーションに関する情報を格納している WebApplicationInformation オブジェクトを取得します。(WebBaseEvent から継承されます。) |
![]() | EventCode | イベントに関連付けられているコード値を取得します。(WebBaseEvent から継承されます。) |
![]() | EventDetailCode | イベント詳細コードを取得します。(WebBaseEvent から継承されます。) |
![]() | EventID | イベントに関連付けられている識別子を取得します。(WebBaseEvent から継承されます。) |
![]() | EventOccurrence | イベントが発生した回数を表すカウンタを取得します。(WebBaseEvent から継承されます。) |
![]() | EventSequence | アプリケーションによるイベントの発生回数を取得します。(WebBaseEvent から継承されます。) |
![]() | EventSource | イベントを発生させるオブジェクトを取得します。(WebBaseEvent から継承されます。) |
![]() | EventTime | イベントが発生した時刻を取得します。(WebBaseEvent から継承されます。) |
![]() | EventTimeUtc | イベントが発生した時刻を取得します。(WebBaseEvent から継承されます。) |
![]() | Message | イベントを説明するメッセージを取得します。(WebBaseEvent から継承されます。) |
![]() | 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 Failure Events Raised パフォーマンス カウンタをインクリメントします。 |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

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

- WebFailureAuditEventのページへのリンク