Click here to Skip to main content
12,304,763 members (64,114 online)
Click here to Skip to main content

Stats

38.9K views
972 downloads
76 bookmarked
Posted

Automatic Error Handling

, 17 Mar 2008 CPOL
Handle web and WinForms exceptions automatically.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<configSections>
		<section name="UnhandledException" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
	</configSections>
	<UnhandledException>
		<add key="ContactInfo" value="Ima Testguy at 123-555-1212"/>
		<add key="IgnoreDebug" value="False"/>
		<add key="IgnoreRegex" value="get_aspx_ver\.aspx"/>
		<add key="SmtpDefaultDomain" value=""/>
		<add key="SmtpServer" value="smtp.gmail.com"/>
		<add key="SmtpPort" value="587"/>
		<add key="SmtpUser" value="youraccount@gmail.com"/>
		<add key="SmtpPwd" value="yourpassword"/>
		<add key="SmtpUseSsl" value="True"/>
		<add key="SmtpFromAddress" value="fromaddress@gmail.com"/>
		<add key="EmailTo" value="helpdesk@yourcompany.com"/>
	</UnhandledException>
</configuration>

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Andy Searls
Software Developer (Senior) Belami
United States United States
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160530.1 | Last Updated 17 Mar 2008
Article Copyright 2008 by Andy Searls
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid