Adicionar elemento eventMappings para healthMonitoring (ASP.NET Settings Schema)

[Esta documentação destina-se apenas à visualização e está sujeita a alterações em versões posteriores. Os tópicos em branco estão incluídos como espaços reservados.]

Especifica o nome do evento e a classe que implementa a ele.

Esse elemento é novo no .NET Framework versão 2.0.

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

Attributes and Elements

As seções a seguir descrevem os atributos, elementos filho e elementos pai para esta seção.

Attributes

Atributo

Descrição

name

Obrigatório String atributo.

Especifica o nome amigável do evento de integridade.

type

Obrigatório String atributo.

Especifica o tipo totalmente qualificado do evento.

startEventCode

Opcional Int32 atributo.

Especifica o intervalo de identificador de código inicial do evento.

O padrão é 0.

endEventCode

Opcional Int32 atributo.

Especifica o intervalo de identificador de código final do evento.

O padrão é "Infinite".

Child Elements

Nenhum.

Parent Elements

Elemento

Descrição

configuration

Especifica o elemento de raiz em todos os arquivos de configuração que é usado pelo Common Language Runtime e os aplicativos .NET Framework.

system.web

Especifica o elemento raiz para o ASP.Seção de configuração de rede.

healthMonitoring

Configura um aplicativo para monitoração integridade.

eventMappings

Mapeia nomes amigáveis de eventos para os tipos de eventos relacionados.

Remarks

O add elemento permite que você atribuir nomes amigáveis para origens de eventos. Esses nomes são usados para associar os consumidores de eventos relacionados, chamados provedores, em fontes de evento a rules elemento da healthMonitoring seção.

Configuração padrão

O seguinte padrão add elemento é configurado no arquivo Web. config raiz na.NET Framework versão 2.0.

<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" />

Exemplo

O exemplo de código a seguir mostra como adicionar um evento à coleção.

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

Element Information

Manipulador da seção de configuração

System.Web.Configuration.HealthMonitoringSection

Membro de configuração

HealthMonitoringSection.EventMappings

Locais configuráveis

Machine.config

Web. config de nível de raiz

Web. config de nível de aplicativo

Requisitos

Serviços de Informações da Internet da Microsoft (IIS) versão 5.0, 5.1 ou 6.0

A.NET Framework versão 2.0

Microsoft Visual Studio 2005

Consulte também

Tasks

How to: Lock ASP.NET Configuration Settings

Reference

healthMonitoring Element (ASP.NET Settings Schema)

eventMappings elemento para healthMonitoring (ASP.NET Settings Schema)

remover o elemento eventMappings para healthMonitoring (ASP.NET Settings Schema)

Desmarque elemento eventMappings para healthMonitoring (ASP.NET Settings Schema)

System.Configuration

System.Web.Configuration

Concepts

ASP.NET Configuration Overview

ASP.NET Server Controls and Browser Capabilities

Securing Configuration

Configuration Inheritance

Other Resources

ASP.NET Configuration Files

ASP.Definições de configuração de rede

Configurações gerais (ASP.NET)

ASP.NET Configuration API