Software engineering involves a number of important stages that occur before the application is deployed, such as
requirements analysis, design, coding, and testing. The software engineering process, however, does not end once an
application has been deployed and is being used. Regardless of how well designed, coded, and tested a web application may
have been, there will invariably be hiccups. The database server may go offline, the website might be experiencing an
unexpected heavy load, or there may be a hardware failure on the web server itself. And, unless the application is trivial
or you are a programming god, there are bound to be bugs that will weild their nasty little heads every now and then.
To help detect and diagnose problems, it is important that key web application metrics and information are monitored and logged.
There are a number of open-source and Microsoft-created libraries to help with with logging unhandled exceptions and notifying
developers. See Gracefully Responding to Unhandled Exceptions -
Processing Unhandled Exceptions for information on how to log unhandled exceptions.
ASP.NET version 1.x did not include any built-in logging and notification system and therefore required a little bit of
code or configuration effort from the developer. ASP.NET 2.0, however,
provides built-in Health Monitoring facilities that make it a snap to configure a website to record events to the
event log, a database, via WMI, in an email, or
to the ASP.NET page tracing system. Moreover, the Health Monitoring system was created using the provider
design pattern, making it possible to implement our own logging logic.
This is the start of a series that explores the ASP.NET 2.0 Health Monitoring system. In this article we will examine the basics
of Health Monitoring and see how to setup Health Monitoring to log events to a SQL Server database. Read on to learn more!
Read More >