System.Web.Management.WebEventCodes Class

Defines the codes associated with the ASP.NET health monitoring events.

See Also: WebEventCodes Members

Syntax

public sealed class WebEventCodes

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 System.Web.Management.WebEventCodes class contains codes that identify types of health-monitoring events. Two types of codes are defined within the class: major codes, which identify the ASP.NET health-monitoring events; and detail codes, which provide more information about a related major code. These codes are implemented as integers, rather than as an enumeration, to allow for extensibility.

When a health-monitoring event is raised, it is associated with a major event code. The following list identifies the categories of major event codes that are defined within the System.Web.Management.WebEventCodes class:

You can create your own custom event code by choosing code values above WebEventCodes.WebExtendedBase.

In the eventMappings health-monitoring configuration element, you can optionally specify an event-code range. If the event code range is specified, the mapping only applies to the events that have an event code within that range; otherwise, it applies to all the event codes. The following configuration file excerpt shows the System.Web.Management.EventLogWebEventProvider configured to handle System.Web.Management.WebFailureAuditEvent events whose event codes belong to the audit category.

Example

<healthMonitoring>
  <eventMappings> 
    <add name="Failure Audits" type=
      "System.Web.Management.WebFailureAuditEvent,System.Web, Version=2.0.3600.0,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  </eventMappings>

  <rules>
    <add name="Failure Audits Default"
      eventName="Failure Audits"
      provider="EventLogProvider"
      profile="Default"
      minInterval="00:01:00" />
  </rules>
</healthMonitoring>

You can create your own custom event code by choosing code values above WebEventCodes.WebExtendedBase.

Requirements

Namespace: System.Web.Management
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0