Export (0) Print
Expand All

EventMappingSettings Class

Defines the ASP.NET event mapping settings for event providers. This class cannot be inherited.

Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)

public sealed class EventMappingSettings : ConfigurationElement
public final class EventMappingSettings extends ConfigurationElement
public final class EventMappingSettings extends ConfigurationElement
Not applicable.

This class corresponds to the eventMappings configuration-file element. The eventMappings element allows you to assign friendly names to event sources. These names are then used to associate event sources with the related event consumers, called providers, in the rules subsection of the healthMonitoring section of the configuration file.

Event codes are mapped to events defined by the constants in the WebEventCodes object. The mapping uses a range specified with the StartEventCode and EndEventCode properties.

The following configuration file excerpt shows how to declaratively specify values for several properties of the EventMappingSettings class.

<healthMonitoring>
  <eventMappings>
    <add name="All Events"
      type="System.Web.Management.WebBaseEvent, System.Web, 
      Version=%ASSEMBLY_VERSION%, Culture=neutral, 
      PublicKeyToken=%MICROSOFT_PUBLICKEY%" 
    />
    <add name="HeartBeats"
      type="System.Web.Management.WebHeartBeatEvent, System.Web, 
      Version=%ASSEMBLY_VERSION%, Culture=neutral, 
      PublicKeyToken=%MICROSOFT_PUBLICKEY%" 
    />
        <add name="Application Lifetime Events"
            type="System.Web.Management.WebApplicationLifetimeEvent, System.Web, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%" 
        />
        <add name="Request Processing Events"
            type="System.Web.Management.WebRequestEvent, System.Web, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%" 
        />
        <add name="All Errors"
            type="System.Web.Management.WebBaseErrorEvent, System.Web, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%" 
        />
        <add name="Infrastructure Errors"
            type="System.Web.Management.WebErrorEvent, System.Web, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%" 
        />
        <add name="Request Processing Errors"
            type="System.Web.Management.WebRequestErrorEvent, System.Web, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%" 
        />
        <add name="All Audits"
            type="System.Web.Management.WebAuditEvent, System.Web, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%" 
        />
        <add name="Failure Audits"
            type="System.Web.Management.WebFailureAuditEvent, System.Web, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%" 
        />
        <add name="Success Audits"
            type="System.Web.Management.WebSuccessAuditEvent, System.Web, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%" 
        />
    </eventMappings>
</healthMonitoring> 

System.Object
   System.Configuration.ConfigurationElement
    System.Web.Configuration.EventMappingSettings

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft