ASP.NET 2.0 provides much needed project health monitoring through its Health Monitoring feature. Simply add few tags and their values in Web.Config
and your project will be automatically monitored.
This feature allows you to write to EventLog, SQL Server, and also lets you write your own provider. The easiest feature to implement is the "Email Sending" feature. This eliminates the need to log and mail code in the web site's framework. This feature is so intelligent that it sends a single email for the set interval, thus not flooding your mailbox. Add the "healthMonitoring" config section under the System.Web to Web.Config and set the
key-values as shown in the code below:
<add provider="EmailProvider" name="All App Events" eventName="All Errors" />
Also add the System.Net Section for the SMTP Server Configuration
<network host="smtp.projects.com" />