Aleksandar's computer workshop

Let's see what Aleksandar was fixing today.
My findings, tips & tricks related to computers, internet, programming and other stuff I was working with.

Health monitoring in ASP.NET 2.0

Here is a very simple web.config file that sends an e-mail whenever an unhandled error occurs. Pay attention to the <healthMonitoring> and <> section. These are the important ones that makes it work.


<?xml version="1.0"?>

      <compilation debug="false" />
      <trace enabled="true" localOnly="false" />

      <healthMonitoring enabled="true">
            <add name="EmailProvider" 
               subjectPrefix="Error: "
               bufferMode="Notification" />
            <add provider="EmailProvider" name="All App Events" eventName="All Errors" />

         <smtp from="">
            <network host="" />

How easy can it get? Truly amazing.