Asp. HealthMonitor attribute usage in net

Source: Internet
Author: User
Tags time interval
In asp.net 2.0, you can use the healthmonitoring property to monitor events. The Healthmonitoring property is a method based provider, where you can construct your own provider. With the healthmonitoring attribute, we can create our own providers for different data sources, such as event logs, SQL Server, or even for ourselves by inheriting webeventprovider classes, such as recording the wrong language, succeeding events, and so on. In this article, I'm going to introduce a Web application that configures a SQL Server to monitor the wrong language and send mail to someone's e-mail address. First, take a look at the healthmonitoring program fragment in Web.config, where you can build the event you want to use.
<bufferModes> ... </bufferModes>
<providers> ... </providers>
<eventMappings> ... </eventMappings>
<profiles> ... </profiles>
<rules> ... </rules>
If you look at the Buffermodes, where you can define the size of a provider buffer.
Providers, here is a description of the Providers handling the event.
Eventmappings, here you can draw an event name related to the friendly event type.
Profiles, this defines a set of parameter sets that can be used to configure events.
Rules, here's a picture of the providers event.
You can read more about these elements in the VS 2550 document.
Before continuing, here is a list of some providers included in asp.net:
System.Web.Management.MailWebEventProvider
System.Web.Management.SimpleMailWebEventProvider
System.Web.Management.TemplatedMailWebEventProvider
System.Web.Management.TraceWebEventProvider
System.Web.Management.EventLogWebEventProvider
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.