Setup Notifications for ELMAH Errors
Now that ELMAH is setup, you need a way to be notified when an error occurs. Though you can just subscribe to your ELMAH RSS feed at /elmah.axd/rss, I prefer to receive an email notification as soon as an error happens. To do this simply merge the following changes into your web.config's <configuration> section.
<system.web> <httpModules> <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" /> </httpModules> </system.web> </pre> <system.webServer> <modules> <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" /> </modules> </system.webServer> <elmah> <errorMail from="firstname.lastname@example.org" to="email@example.com" subject="elmah error mail" /> </elmah>
There's a lot more configurability, but those are the basics. Here's a good article showing more options. Also if you haven't already done it, set your smtp settings too...
<system.net> <mailSettings> <smtp> <network host="localhost" /> </smtp> </mailSettings> </system.net>