JavaScript Editor jscript editor     Web designer 



Main Page

The classes associated with ASP.NET health monitoring are contained in the System.Web.Management namespace. They are divided into two parts: Web event classes (also known as health events), and provider classes. Web event classes are responsible for packaging Web event information. Provider classes listen for and consume the Web events and deliver the data. The System.Web.Management namespace also contains supporting classes that help during the management of Web events. ASP.NET health monitoring uses a subscriber/provider model to provide event notifications. For more information, see ASP.NET Health Monitoring Overview.

Extensibility Options

Developers can perform any or all of the following tasks to extend ASP.NET health monitoring features:

  • Create a custom Web event class by creating a class that implements the WebBaseEvent class or the WebBaseErrorEvent class. To add custom data to a custom event, override the FormatCustomEventDetails method. Do not override the ToString method. This is to avoid overwriting or tampering with sensitive system information. Custom events must be explicitly raised by calling the Raise method. (Standard events can only be raised by ASP.NET.) For code examples, see How to: Implement and Raise Custom ASP.NET Health Monitoring Events.

  • Customize a standard event type by creating a class that implements the IWebEventCustomEvaluator interface.

  • Create a custom provider to process an event by creating a class that inherits the WebEventProvider or BufferedWebEventProvider class. If your provider performs logging, you can also use the WebEventFormatter class. Custom event providers can be used to log events to a custom log file, send event data to third-party applications, and so on. For code examples, see How to: Implement the Health Monitoring Custom Provider Example.

Web Event Class Hierarchy

When a Web event is raised, an instance of the associated event class is created. Event data is collected in the properties of this object. Event providers consume this data. For more information, see "How ASP.NET Health Monitoring Works" in ASP.NET Health Monitoring Overview.

Web events can contain information about the worker process, application domain, request data, response data, application errors, configuration errors, and audit events. Health information contained in a parent event class is inherited by any child event classes.

The relationships between the Web event classes are shown in the following illustration. They are members of the System.Web.Management namespace.

Web event class relationships

ASP.NET Health Monitoring

The further down in the hierarchy of Web event classes, the more specific the data is to the ASP.NET application. For example, derived classes expose information such as stack traces, client IPs, and thread and process information.

For a code example of a custom Web event, see Implementing Custom ASP.NET Health Monitoring Events and Providers.

Web Event Information

To use Web events, you must understand the information they convey. In essence, monitoring an ASP.NET application consists of gathering information that defines its health status.

The rows in the following table refer to the Web event classes. The columns in the following table refer to the information classes, which are usually included as properties in the Web event classes. Using the table, you can find out what Web event class you need to use or inherit from to obtain the desired information.

If your application is not running with Full trust, only the WebBaseEvent class is inheritable. This helps protect against exposing sensitive information through the information classes listed in this table.

Web event classes WebApplicationInformation WebProcessInformation WebProcessStatistics WebRequestInformation WebThreadInformation

WebBaseEvent

Web event data generated in this object

Not available

Not available

Not available

Not available

WebManagementEvent

Data inherited from parent

Web event data generated in this object

Not available

Not available

Not available

WebHeartBeatEvent

Data inherited from parent

Data inherited from parent

Web event data generated in this object

Not available

Not available

WebRequestEvent

Data inherited from parent

Data inherited from parent

Not available

Web event data generated in this object

Not available

WebApplicationLifetimeEvent

Data inherited from parent

Data inherited from parent

Not available

Not available

Not available

WebBaseErrorEvent

Data inherited from parent

Data inherited from parent

Not available

Not available

Not available

WebErrorEvent

Data inherited from parent

Data inherited from parent

Not available

Web event data generated in this object

Web event data generated in this object

WebRequestErrorEvent

Data inherited from parent

Data inherited from parent

Not available

Web event data generated in this object

Web event data generated in this object

WebAuditEvent

Data inherited from parent

Data inherited from parent

Not available

Web event data generated in this object

Not available

WebSuccessAuditEvent

Data inherited from parent

Data inherited from parent

Not available

Data inherited from parent

Not available

WebAuthenticationSuccessAuditEvent

Data inherited from parent

Data inherited from parent

Not available

Data inherited from parent

Not available

WebFailureAuditEvent

Data inherited from parent

Data inherited from parent

Not available

Data inherited from parent

Not available

WebAuthenticationFailureAuditEvent

Data inherited from parent

Data inherited from parent

Not available

Data inherited from parent

Not available

WebViewStateFailureAuditEvent

Data inherited from parent

Data inherited from parent

Not available

Data inherited from parent

Not available

Provider Class Hierarchy

The following default providers are responsible for processing Web events. You can inherit from the following classes to create your own custom provider:

  • The WebEventProvider class can be inherited by applications that run under any trust level.

  • The BufferedWebEventProvider class can be inherited by applications that run under any trust level.

  • The SqlWebEventProvider class can be inherited only by applications that run under Full trust.

  • All other classes cannot be inherited by applications, regardless of trust level.

For more information and code examples, see the respective class overviews or Implementing Custom ASP.NET Health Monitoring Events and Providers.

The relationship between the Web provider classes of the System.Web.Management namespace are shown in the following illustration.

Web provider class relationships

ASP .NET Health Monitoring Provider Class Diagram

For a code example of a custom event provider, see Implementing Custom ASP.NET Health Monitoring Events and Providers.

See Also



JavaScript Editor jscript editor     Web designer