Udostępnij za pośrednictwem


Configuring ASP.NET Health Monitoring

The ASP.NET health monitoring system (implemented using classes in the System.Web.Management namespace) enables you to add instrumentation to Web applications—that is, to add health monitoring events (referred to as Web events) that provide health status information. You can then configure the application with built-in or customized monitoring providers to process this information and report on the health status and the performance characteristics of the instrumented application. For more information, see ASP.NET Health Monitoring Overview.

You add Web events and providers to an application by configuring the healthMonitoring section in the configuration file and using built-in or custom classes for processing the event data. The tasks you perform are:

  • Configure and enable Web events to monitor.

  • Configure and enable event providers that listen for and process various Web events.

For more information about configuration files, see ASP.NET Configuration Files.

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 process 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 hierarchy

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. The rows in the following table refer to the Web event classes. The columns refer to the information classes, which are usually included as properties in the Web event classes. Using the table, you can decide 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

Data generated by this class.

Not available

Not available

Not available

Not available

WebManagementEvent

Data generated by the parent class

Data generated by this class.

Not available

Not available

Not available

WebHeartBeatEvent

Data generated by the parent class.

Data generated by the parent class

Data generated by this class.

Not available

Not available

WebRequestEvent

Data generated by the parent class

Data generated by the parent class

Not available

Data generated by this class.

Not available

WebApplicationLifetimeEvent

Data generated by the parent class

Data generated by the parent class

Not available

Not available

Not available

WebBaseErrorEvent

Data generated by the parent class

Data generated by the parent class

Not available

Not available

Not available

WebErrorEvent

Data generated by the parent class

Data generated by the parent class

Not available

Data generated by this class.

Data generated by this class.

WebRequestErrorEvent

Data generated by the parent class

Data generated by the parent class

Not available

Data generated by the parent class

Data generated by the parent class

WebAuditEvent

Data generated by the parent class

Data generated by the parent class

Not available

Data generated by this class.

Not available

WebSuccessAuditEvent

Data generated by the parent class

Data generated by the parent class

Not available

Data generated by the parent class

Not available

WebAuthenticationSuccessAuditEvent

Data generated by the parent class

Data generated by the parent class

Not available

Data generated by the parent class

Not available

WebFailureAuditEvent

Data generated by the parent class

Data generated by the parent class

Not available

Data generated by the parent class

Not available

WebAuthenticationFailureAuditEvent

Data generated by the parent class

Data generated by the parent class

Not available

Data generated by the parent class

Not available

WebViewStateFailureAuditEvent

Data generated by the parent class

Data generated by the parent class

Not available

Data generated by the parent class

Not available

Provider Class Hierarchy

ASP.NET includes built-in providers that can you can use to process Web events. You can also inherit from built-in classes to create your own custom provider, subject to the inheritance limitations listed here:

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 is shown in the following illustration:

Web provider class hierarchy

ASP .NET Health Monitoring Provider Class Diagram

See Also

Tasks

How to: Implement and Raise Custom ASP.NET Health Monitoring Events
How to: Implement the Health Monitoring Custom Provider Example

Reference

healthMonitoring Element (ASP.NET Settings Schema)

Concepts

Using ASP.NET Health Monitoring Events
Implementing Custom ASP.NET Health Monitoring Events and Providers

Other Resources

Configuring ASP.NET Applications