IWebEventCustomEvaluator Interface

Evaluates whether an event should be sent to the related provider for processing.

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

public interface class IWebEventCustomEvaluator
public interface IWebEventCustomEvaluator
public interface IWebEventCustomEvaluator
Not applicable.

ASP.NET health monitoring allows production and operations staff to manage deployed Web applications. The System.Web.Management namespace contains the health-event types responsible for packaging application health-status data and the provider types responsible for processing this data. It also contains supporting types that help during the management of health events.

This interface allows enabling or disabling the firing of a specific event. This is especially useful when you implement your own custom event and want to control the rate at which it is sent to the related provider for processing.

NoteNote:

This interface does not control how often the event is raised. It only controls how often the event information is sent to the provider for processing.

The following code example shows how to derive from the IWebEventCustomEvaluator interface when creating a custom event.

No code example is currently available or this language may not be supported.

The following is an excerpt of the configuration file that enables ASP.NET to use the CanFire method to decide whether the raised event must be sent to the provider for processing.

<healthMonitoring 
  heartBeatInterval="0" enabled="true">

    <providers>
      <add name="SampleWebEventProvider" 
        type="SamplesAspNet.SampleEventProvider, webeventprovider, Version=1.0.1741.20369, Culture=neutral, PublicKeyToken=cf85aa6c978d9dea, processorArchitecture=MSIL" />
    </providers>

    <profiles>
      <add 
        name="Custom" 
        minInstances="1" 
        maxLimit="Infinite" 
        minInterval="00:00:00" 
        custom ="SamplesAspNet.SampleWebRequestEvent,webrequestevent" 
        />
    </profiles>

    <eventMappings>

      <add name="SampleWebRequestEvent" type="SamplesAspNet.SampleWebRequestEvent,webrequestevent, Version=1.0.1759.20533, Culture=neutral, PublicKeyToken=0d72899b07049076, processorArchitecture=MSIL" />

    </eventMappings>

    <rules>
      <clear />

        <add name="Custom Web Request Event" 
          eventName="SampleWebRequestEvent"
          provider="SampleWebEventProvider" profile="Custom" />
    </rules>

</healthMonitoring>

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, 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: