<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="http://aspnet.4guysfromrolla.com/rss/rss2html.xsl" version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>4GuysFromRolla.com :: Health Monitoring Article Series</title>
<link>http://aspnet.4guysfromrolla.com/articles/031407-1.aspx</link>
<description>An article series on ASP.NET version 2.0's Health Monitoring system.</description>
<language>en-us</language>
<webMaster>mitchell@4guysfromrolla.com (Scott Mitchell)</webMaster>
<atom:link href="http://aspnet.4guysfromrolla.com/rss/healthMonitoring.xml" rel="self" type="application/rss+xml" />

<item>
	<title>Health Monitoring in ASP.NET 2.0: Raising Custom Events</title>
	<description>
&lt;p&gt;
As discussed in previous articles in this article series, ASP.NET 2.0's Health Monitoring system is designed to monitor the health of a 
running ASP.NET application in a production environment by recording event information to a specified log source. The Health Monitoring system
includes a plethora of pre-defined events and the ASP.NET runtime will automatically raise certain events during the course of an application's
lifetime. However, there may be times when we need to raise these events programmatically through our own code. Moreover, we can create our
own custom events for scenarios not already accounted for by the Health Monitoring system.
&lt;/p&gt;&lt;p&gt;
In this article we will examine how to create a custom event and then how to programmatically raise it. As with other Health Monitoring events,
when the event has been raised the Health Monitoring system will consult the configuration information in &lt;code&gt;Web.config&lt;/code&gt; to determine
what log source(s) to record the event's details. For this article we will create a custom event and write code to record log in attempts on
a locked out user account. Read on to learn more!
&lt;/p&gt;
	</description>
	<link>http://aspnet.4guysfromrolla.com/articles/062707-1.aspx</link>
	<guid>http://aspnet.4guysfromrolla.com/articles/062707-1.aspx</guid>
	<pubDate>Wed, 27 Jun 2007 00:00:00 GMT</pubDate>
	<author>mitchell@4guysfromrolla.com (Scott Mitchell)</author>
</item>

<item>
	<title>Health Monitoring in ASP.NET 2.0: Notifications via Email</title>
	<description>
&lt;p&gt;The Health Monitoring system in &lt;a href="http://aspnet.4guysfromrolla.com/2.0/"&gt;ASP.NET 2.0&lt;/a&gt; is designed to monitor the 
health of a running ASP.NET application in a production environment. It works by recording event information to a specified 
log source. The .NET 2.0 Framework includes a variety of built-in events that can be used by the Health 
Monitoring system, including events for monitoring application re-starts and stops, unhandled exceptions, and failed 
authentication attempts, among others. The .NET Framework also include support for logging these events to the Windows event
log, to a Microsoft SQL Server database, via &lt;a href="http://www.microsoft.com/whdc/system/pnppwr/wmi/default.mspx"&gt;WMI&lt;/a&gt;,
in an email, and to the ASP.NET page tracing system.
As we saw in &lt;a href="http://aspnet.4guysfromrolla.com/articles/031407-1.aspx"&gt;The Basics&lt;/a&gt;, when using the out-of-the-box
events and log sources, the Health Monitoring system can be setup and configured entirely through &lt;code&gt;Web.config&lt;/code&gt;
without needing to write a single line of code!
&lt;/p&gt;&lt;p&gt;
In this article we will continue our exploration of the built-in events and log sources. In particular, we will look at the
&lt;code&gt;WebFailureAuditEvent&lt;/code&gt; event, which is raised when there is a security audit failure. We will also look at the
&lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.management.simplemailwebeventprovider.aspx"&gt;&lt;code&gt;SimpleMailWebEventProvider&lt;/code&gt;
event provider&lt;/a&gt;, which, as its name implies, sends event information via email. Read on to learn more!
&lt;/p&gt;
	</description>
	<link>http://aspnet.4guysfromrolla.com/articles/032107-1.aspx</link>
	<guid>http://aspnet.4guysfromrolla.com/articles/032107-1.aspx</guid>
	<pubDate>Wed, 21 Mar 2007 00:00:00 GMT</pubDate>
	<author>mitchell@4guysfromrolla.com (Scott Mitchell)</author>
</item>

<item>
	<title>Health Monitoring in ASP.NET 2.0: The Basics</title>
	<description>
&lt;p&gt;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.
&lt;/p&gt;&lt;p&gt;
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 &lt;a href="http://aspnet.4guysfromrolla.com/articles/091306-1.aspx"&gt;Gracefully Responding to Unhandled Exceptions - 
Processing Unhandled Exceptions&lt;/a&gt; for information on how to log unhandled exceptions.
&lt;/p&gt;&lt;p&gt;
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. &lt;a href="http://aspnet.4guysfromrolla.com/2.0/"&gt;ASP.NET 2.0&lt;/a&gt;, however, 
provides built-in &lt;i&gt;Health Monitoring&lt;/i&gt; facilities that make it a snap to configure a website to record events to the
event log, a database, via &lt;a href="http://www.microsoft.com/whdc/system/pnppwr/wmi/default.mspx"&gt;WMI&lt;/a&gt;, in an email, or 
to the ASP.NET page tracing system. Moreover, the Health Monitoring system was created using the &lt;a href="http://aspnet.4guysfromrolla.com/articles/101905-1.aspx"&gt;provider
design pattern&lt;/a&gt;, making it possible to implement our own logging logic.
&lt;/p&gt;&lt;p&gt;
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!
&lt;/p&gt;
	</description>
	<link>http://aspnet.4guysfromrolla.com/articles/031407-1.aspx</link>
	<guid>http://aspnet.4guysfromrolla.com/articles/031407-1.aspx</guid>
	<pubDate>Wed, 14 Mar 2007 00:00:00 GMT</pubDate>
	<author>mitchell@4guysfromrolla.com (Scott Mitchell)</author>
</item>

</channel>
</rss>