Share via


EventMappingElement Class [IIS 7 and higher]

Maps friendly event names to related event types.

Syntax

class EventMappingElement: CollectionElement

Methods

This class contains no methods.

Properties

The following table lists the properties exposed by the EventMappingElement class.

Name

Description

EndEventCode

A read/write sint32 value that specifies the ending event code of the event mapping range. The default is 2147483647.

Name

A read-only unique string value that specifies the friendly name of the event mapping setting. The key property.

NoteNote:
Duplicate event mapping names may cause a loss of data when the configuration section is saved.

StartEventCode

A read/write sint32 value that specifies the starting event code of the event mapping range. The default is 0.

Type

A read/write string value that specifies the type of a custom event. The specified type can be the actual class type or a parent type of the event class. If it is an empty string (""), no event is mapped, and the event mapping acts as a placeholder.

NoteNote:
The type reference is formed as follows (items in brackets are not required): Namespace.Typename, Assemblyname[,] [Version=x,] [Culture=y,] [PublicKeyToken=z] (for example, "ExampleNameSpace.ExampleType, Example.Assembly, Version=%ASSEMBLY_VERSION%, Culture=neutral, PublicKeyToken=%MICROSOFT_PUBLICKEY%").

Subclasses

This class contains no subclasses.

Remarks

Instances of this class are contained in the EventMappings array property of the EventMappingSettings class.

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

Event mappings enable you to assign friendly names to event sources. The Rules property of the HealthMonitoringSection class uses these names to associate event sources with the related event consumers, called providers.

Inheritance Hierarchy

CollectionElement

   EventMappingSettings

Requirements

Type

Description

Client

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

See Also

Reference

CollectionElement Class [IIS 7 and higher]

HealthMonitoringSection Class [IIS 7 and higher]

ProviderSettings Class [IIS 7 and higher]

RuleSettings Class [IIS 7 and higher]

WebEventCodes