ASP.NET 2.0 Health Monitoring

In addition to trace listeners, ASP.NET 2.0 has added a health monitoring system to log web events for a web application. Health Monitoring is similar to trace listeners with the additional option of logging the events to a SQL Server database.The only thing that distinguishes health monitoring from trace listeners is that it is exclusively for ASP.NET 2.0 web applications and not for Windows form applications. Health monitoring allows you to capture web events and add them to the traditional ASP.NET trace page. It can also send emails about web events. All of this can be set up in the web.config file without any special coding unless you want to create your own events.

So when should you use health monitoring and when should you use trace listeners? Health monitoring is the best choice for a production site that you want to monitor. You can monitor application starts and terminations, user authentications, and errors that occur while the web application is running. A trace listener is better for debugging when you want to output the value of many variables and trace the execution of your code.

This entry was posted in ASP.NET. Bookmark the permalink.

Leave a Reply

Your email address will not be published.