RuleElement Class

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 System.Web.Management.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%"). Note: 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. Note: 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 - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
MOF file WebAdministration.mof

See Also

CollectionElement Class
EventMappingSettings Class
HealthMonitoringSection Class
ProfileSettings Class
ProviderSettings Class
RuleSettings Class
ASP.NET Health Monitoring Overview
CIM_DATETIME