次の方法で共有


healthMonitoring の eventMappings の add 要素 (ASP.NET 設定スキーマ)

更新 : 2007 年 11 月

イベントの名前と、そのイベントを実装するクラスを指定します。

この要素は、.NET Framework Version 2.0 で追加されました。

<configuration> 要素
  system.web 要素 (ASP.NET 設定スキーマ)
    healthMonitoring 要素 (ASP.NET 設定スキーマ)
      healthMonitoring の eventMappings 要素 (ASP.NET 設定スキーマ)
        healthMonitoring の eventMappings の add 要素 (ASP.NET 設定スキーマ)

<add
    name="health event name"
    type="type reference"
    startEventCode="starting event code range"
    endEventCode="ending event code range" />

属性と要素

以降のセクションでは、このセクションに示す属性、子要素、および親要素について説明します。

属性

属性

説明

name

必須の String 属性です。

ヘルス イベントの表示名を指定します。

type

必須の String 属性です。

イベントの完全限定型を指定します。

startEventCode

省略可能な Int32 型の属性です。

イベント コード識別子の開始範囲を指定します。

既定値は 0 です。

endEventCode

省略可能な Int32 型の属性です。

イベント コード識別子の終了範囲を指定します。

既定値は "Infinite" です。

子要素

なし。

親要素

要素

説明

configuration

共通言語ランタイムおよび .NET Framework アプリケーションで使用されるすべての構成ファイルのルート要素を指定します。

system.web

ASP.NET 構成セクションのルート要素を指定します。

healthMonitoring

状態の監視に対応したアプリケーションを構成します。

eventMappings

イベントの表示名を関連するイベントの種類にマップします。

解説

add 要素を使用すると、イベント ソースに表示名を割り当てることができます。次に、これらの名前を使用して、healthMonitoring セクションの rules 要素で、プロバイダと呼ばれるイベント ソースを、関連するイベント コンシューマに関連付けます。

既定の構成

次の既定の add 要素は、.NET Framework Version 2.0 においてルートの Web.config ファイルで構成されています。

<add name="All Events" type="System.Web.Management.WebBaseEvent,System.Web,Version=2.0.0.0,
     Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" 
     endEventCode="2147483647" />
<add name="Heartbeats" type="System.Web.Management.WebHeartbeatEvent,System.Web,Version=2.0.0.0,
     Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" 
     endEventCode="2147483647" />
<add name="Application Lifetime Events" type="System.Web.Management.WebApplicationLifetimeEvent,
System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" 
     startEventCode="0" endEventCode="2147483647" />
<add name="Request Processing Events" type="System.Web.Management.WebRequestEvent,
System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" 
     endEventCode="2147483647" />
<add name="All Errors" type="System.Web.Management.WebBaseErrorEvent,System.Web,Version=2.0.0.0,
     Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" 
     endEventCode="2147483647" />
<add name="Infrastructure Errors" type="System.Web.Management.WebErrorEvent,System.Web,Version=2.0.0.0,
     Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" 
     endEventCode="2147483647" />
<add name="Request Processing Errors" type="System.Web.Management.WebRequestErrorEvent,
System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" 
     endEventCode="2147483647" />
<add name="All Audits" type="System.Web.Management.WebAuditEvent,System.Web,Version=2.0.0.0,
     Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" 
     endEventCode="2147483647" />
<add name="Failure Audits" type="System.Web.Management.WebFailureAuditEvent,System.Web,Version=2.0.0.0,
     Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" 
     endEventCode="2147483647" />
<add name="Success Audits" type="System.Web.Management.WebSuccessAuditEvent,System.Web,Version=2.0.0.0,
     Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" startEventCode="0" 
     endEventCode="2147483647" />

使用例

コレクションにイベントを追加するコード例を次に示します。

<eventMappings>
  <add name="SampleWebEvent"
    type= "Samples.AspNet.System.Web.Management.SampleWebEvent,
    SampleWebEvent,Version=0.0.0.0, Culture=neutral, 
    PublicKeyToken=f0c63b9a560d5e5a"/>
</eventMappings>

要素情報

構成セクション ハンドラ

System.Web.Configuration.HealthMonitoringSection

構成メンバ

HealthMonitoringSection.EventMappings

構成できる場所

Machine.config

ルート レベルの Web.config

アプリケーション レベルの Web.config

必要条件

Microsoft Internet Information Services (IIS) バージョン 5.0、5.1、または 6.0

.NET Framework Version 2.0

Microsoft Visual Studio 2005

参照

処理手順

方法 : ASP.NET 構成設定をロックする

概念

ASP.NET 構成の概要

ASP.NET Web サーバー コントロールとブラウザの機能

ASP.NET 構成の保護

ASP.NET の構成のシナリオ

参照

healthMonitoring 要素 (ASP.NET 設定スキーマ)

healthMonitoring の eventMappings 要素 (ASP.NET 設定スキーマ)

healthMonitoring の eventMappings の remove 要素 (ASP.NET 設定スキーマ)

healthMonitoring の eventMappings の clear 要素 (ASP.NET 設定スキーマ)

System.Configuration

System.Web.Configuration

その他の技術情報

ASP.NET 構成ファイル

ASP.NET 構成設定

全般構成設定 (ASP.NET)

ASP.NET 構成 API