-
-
My latest MSDN article is available, Using HTTP Modules and Handlers to Create Pluggable ASP.NET Components. This article, coauthored with Atif Aziz, looks at how to create components that you can plug into your ASP.NET Web applications in a matter of minutes. Specifically, the article looks at creating an error logging component that we call ELMAH - Error Logging Modules And Handlers. It's a pretty slick way to have a site-wide error logger with a pretty administrative UI to boot.
The best part about ELMAH is that it can be integrated into your site literally within minutes. I was talking to one of my consulting clients earlier this week, and he wanted a mechanism for users who encountered an error to be able to record the error information so that I would have a nice log of what had gone awry. He proposed creating a simple data entry page where a user could enter the exception details: here's what went wrong, this is what I was doing, etc. I suggested implementing a site-wide error logger (i.e., ELMAH), and said I could provide this functionality quicker than I could create a data entry page. The client was a bit skeptical at first until, less than five minutes later, ELMAH was up and running on his site. It's really as easy as copying a .dll file and editing the Web.config file - nothing more involved than that.