WebEventProvider Class
Provides the base class for non buffered event providers.
Assembly: System.Web (in System.Web.dll)
System.Configuration.Provider::ProviderBase
System.Web.Management::WebEventProvider
System.Web.Management::BufferedWebEventProvider
System.Web.Management::EventLogWebEventProvider
System.Web.Management::IisTraceWebEventProvider
System.Web.Management::TraceWebEventProvider
System.Web.Management::WmiWebEventProvider
| Name | Description | |
|---|---|---|
![]() | WebEventProvider() | This API supports the product infrastructure and is not intended to be used directly from your code. Initializes a new instance of the WebEventProvider class. |
| Name | Description | |
|---|---|---|
![]() | Description | Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs).(Inherited from ProviderBase.) |
![]() | Name | Gets the friendly name used to refer to the provider during configuration.(Inherited from ProviderBase.) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | Flush() | Moves the events from the provider's buffer into the event log. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | Initialize(String^, NameValueCollection^) | Initializes the provider.(Inherited from ProviderBase.) |
![]() | MemberwiseClone() | |
![]() | ProcessEvent(WebBaseEvent^) | Processes the event passed to the provider. |
![]() | Shutdown() | Performs tasks associated with shutting down the provider. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
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.
If you want to customize the health-event processing, you can derive from the WebEventProvider class to create your own custom provider.
Note |
|---|
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. For an example of deriving from the WebEventProvider class, see the example provided in this topic. |
The following code example shows how to derive from the WebEventProvider class to create a custom provider that writes the configured events to a local file for which appropriate access rights must be granted. This custom provider example is simple and its main intent is to give you as developer full control of its basic mechanisms. In a real-world scenario, you could use this provider and especially the example buffered provider available at BufferedWebEventProvider, as a preliminary probe into the behavior of an application. This can help you during the design stage to gain an understanding of the information available; then later you can direct this information to a more complex provider.
The following configuration file excerpt shows a healthMonitoring section configuration that enables ASP.NET to use the custom provider defined above to process all health-monitoring events.
<healthMonitoring
heartBeatInterval="0"
enabled="true">
<providers>
<add name="SampleWebEventProvider"
type="SamplesAspNet.SampleEventProvider,webeventprovider, Version=1.0.1773.33989, Culture=neutral, PublicKeyToken=cf85aa6c978d9dea, processorArchitecture=MSIL" />
</providers>
<rules>
<rule
name="Custom Event Provider"
eventName="All Events"
provider="SampleWebEventProvider"
profile="Default" />
</rules>
</healthMonitoring>
Available since 2.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



