Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
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

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 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

ADD
Show:
© 2015 Microsoft