Click here to Skip to main content
13,256,260 members (43,497 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads


343 bookmarked
Posted 20 Aug 2004

User Friendly ASP.NET Exception Handling

, 20 Dec 2004
A flexible framework for user-friendly ASP.NET exception handling, and automatically notifying developers of problems before users do.
What is it?

This HTTP module implements global Unhandled Exception notification for any ASP.NET website, 
or any ASP.NET Web Service, without recompilation. When your application encounters an Unhandled 
Exception, you get the following for free:

 - a "user friendly" exception web page
 - an email notification 
 - a plain text logfile 
 - Event Log logging
How do I set it up?

This is the Quick Start. Refer to source headers for more options and details.

1) put ASPUnhandledException.dll in the /bin folder

2) Add these configuration options to the <appSettings> section of your Web.config

		<section name="UnhandledException" type="System.Configuration.NameValueSectionHandler, 
			System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

  		<add key="EmailTo" value=";" />	
		<add key="ContactInfo" value="Ima TestGuy at 919-555-1212" />
		<add key="IgnoreRegex" value="get_aspx_ver\.aspx" />
		<add key="SmtpDefaultDomain" value="" />
		<add key="SmtpServer" value="" />

3A) for an ASP.NET website, modify the <system.web> section of your Web.config

	<!-- Adds our error handler to the HTTP pipeline -->
	  <add name="UehHttpModule" 
	       type="ASPUnhandledException.UehHttpModule, ASPUnhandledException" />
2B) for an ASP.NET Web Service, modify the <webServices> section of your Web.config:

	<!-- Adds our error handler to the SOAP pipeline -->
	  <add type="ASPUnhandledException.UehSoapExtension, ASPUnhandledException"
	       priority="1" group="0" />

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Web Developer
United States United States
My name is Jeff Atwood. I live in Berkeley, CA with my wife, two cats, and far more computers than I care to mention. My first computer was the Texas Instruments TI-99/4a. I've been a Microsoft Windows developer since 1992; primarily in VB. I am particularly interested in best practices and human factors in software development, as represented in my recommended developer reading list. I also have a coding and human factors related blog at

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171114.1 | Last Updated 21 Dec 2004
Article Copyright 2004 by wumpus1
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid