次の方法で共有


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

更新 : 2007 年 11 月

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

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

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

<eventMappings>
    <add.../>
    <remove.../>
    <clear />
</eventMappings>

属性と要素

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

属性

なし。

子要素

要素

説明

add

省略可能な要素

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

clear

省略可能な要素

すべてのイベント表示名のマップを削除します。

remove

省略可能な要素

指定されたイベント表示名のマップを削除します。

親要素

要素

説明

configuration

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

system.web

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

healthMonitoring

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

解説

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

既定の構成

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

<eventMappings>
      <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>

使用例

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

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

要素情報

Configuration section handler

System.Web.Configuration.HealthMonitoringSection

Configuration member

HealthMonitoringSection.EventMappings

Configurable locations

Machine.config

ルート レベルの Web.config

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

Requirements

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 の add 要素 (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