.NET Framework Class Library
WebHeartbeatEvent Class

Defines those health-monitoring events raised at a periodic interval.

Namespace:  System.Web.Management
Assembly:  System.Web (in System.Web.dll)
Syntax

Visual Basic (Declaration)
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public Class WebHeartbeatEvent _
    Inherits WebManagementEvent
Visual Basic (Usage)
Dim instance As WebHeartbeatEvent
C#
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class WebHeartbeatEvent : WebManagementEvent
Visual C++
[AspNetHostingPermissionAttribute(SecurityAction::LinkDemand, Level = AspNetHostingPermissionLevel::Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)]
public ref class WebHeartbeatEvent : public WebManagementEvent
JScript
public class WebHeartbeatEvent extends WebManagementEvent
Remarks

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.

The heartbeat health-monitoring events serve as a timer for the ASP.NET health-monitoring system. They are raised at an interval defined by the heartBeatInterval attribute of the healthMonitoring configuration section. The WebHeartbeatEvent uses the WebProcessStatistics class to obtain process information.

NoteNote:

In most cases you will be able to use the ASP.NET health-monitoring types as implemented, and you will control the health-monitoring system by specifying values in the healthMonitoring configuration section. You can also derive from the health-monitoring types to create your own custom events and providers.

Examples

The following configuration file excerpt shows the configuration for the EventLogWebEventProvider so it can handle heartbeat health events.

NoteNote:

The EventLogWebEventProvider and the heartbeat health event types to monitor are configured by default. The only thing you need to do is to define the rule to monitor the heartbeat health events. Remember that by default only the failure audits are logged.

<healthMonitoring 
  enabled="true" heartBeatInterval="100">
  <rules>
    <add name="Heart Beat Events"
      eventName=" HeartBeats"
      provider="EventLogProvider"
      profile="Default"
      minInterval="00:01:00" />
  </rules>
</healthMonitoring>
.NET Framework Security

Inheritance Hierarchy

System..::.Object
  System.Web.Management..::.WebBaseEvent
    System.Web.Management..::.WebManagementEvent
      System.Web.Management..::.WebHeartbeatEvent
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

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.
Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0
See Also

Reference

Other Resources

Tags :


Community Content

Y2KPRABU
It's "Heartbeats", not " HeartBeats"
The Example section is slightly wrong. There is a typo in the eventName attribute. The value should be "Heartbeats" instead of " HeartBeats". (I.E. there is an extra space between the " and H characters in the example.

Also Heartbeats should have lowercase b and not uppercase B as in the example in the help content
This typo causes an error while parsing the Web.config file.
Tags : contentbug

Page view tracker