Share via


RuleElement Class [IIS 7 and higher]

Maps a Web event to a health-monitoring provider.

Syntax

class RuleElement : CollectionElement

Methods

This class contains no methods.

Properties

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

Name

Description

Custom

A read/write string value that specifies the fully qualified type of a custom class that implements the IWebEventCustomEvaluator interface. The default is an empty string ("").

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%").

NoteNote:
This property is new in the .NET Framework version 2.0.

EventName

A read/write string value that specifies the name of an event from the EventMappingSettings class.

MaxLimit

A read/write sint32 value that specifies the maximum number of times that the event specified in the EventName property is raised. The default is 2147483647 (infinite).

MinInstances

A read/write sint32 value that specifies the minimum number of occurrences of the event specified in the EventName property before the event is raised to the provider. The default is 1.

MinInterval

A read/write datetime value that specifies the minimum interval between two events of the type specified in the EventName property. The default is 0 seconds.

NoteNote:
You can minimize the impact on performance of health monitoring by increasing the value of this property.

Name

A read-only string value that specifies the name of the rule element. The key property.

Profile

A read/write string value that specifies an event profile (in the ProfileSettings class) that determines the number of events and the frequency with which they should be raised.

Provider

A read/write string value that specifies the name of a health monitoring provider from the ProviderSettings class.

Subclasses

This class contains no subclasses.

Remarks

Instances of this class are exposed as members of the Rules property on the RuleSettings class.

Health-monitoring events (also called Web events) are raised during Web application processing and are consumed by providers (listeners), which read and record the information packaged with the event.

You can subscribe an existing provider or a custom provider to a Web event by configuring a new RuleElement instance. You can enable an event by mapping it to an event provider in this class. You must configure the event mappings and the provider settings, but unless you connect the event and provider, the event is not raised.

To disable an event, you can remove the event from the RuleSettings class.

Inheritance Hierarchy

CollectionElement

   RuleElement

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]

EventMappingSettings Class [IIS 7 and higher]

HealthMonitoringSection Class [IIS 7 and higher]

ProfileSettings Class [IIS 7 and higher]

ProviderSettings Class [IIS 7 and higher]

RuleSettings Class [IIS 7 and higher]

Other Resources

ASP.NET Health Monitoring Overview

CIM_DATETIME