This project has moved and is read-only. For the latest updates, please go here.

Configuration

ExceptionReporter can be configured in code or in .NET XML config.

To configure via code, simply set the relevant properties on the Config object of the ExceptionReporter class - see Sample Usage for complete examples.

For XML, add a special section to your application configuration (app.config) file as per the sample below. The easiest way to set this up, is to copy the config section below; paste into your app.config and edit as appropriate.

The XML configuration is currently (accidentally) neglected when new features are added such that setting via code may be necessary - we may look at deprecating XML config in the future to avoid any confusion

<configSections>
   <sectionGroup name="ExceptionReporter">
     <section name="Contact" type="System.Configuration.NameValueSectionHandler"/>
     <section name="TabsToShow" type="System.Configuration.NameValueSectionHandler"/>
     <section name="Email" type="System.Configuration.NameValueSectionHandler"/>
     <section name="LabelMessages" type="System.Configuration.NameValueSectionHandler"/>
   </sectionGroup>
 </configSections>
 
 <ExceptionReporter>
   <Contact>
     <add key="email" value="mysupport@zzzsupport.com"/>
     <add key="web" value="www.codeplex.com/ExceptionReporter"/>
     <add key="phone" value="1423 1234 4321"/>
     <add key="fax" value="1423 1234 4322"/>
   </Contact>
   <TabsToShow>
     <add key="exceptions" value="true"/>
     <add key="assemblies" value="true"/>
     <add key="config" value="true"/>
     <add key="system" value="true"/>
     <add key="contact" value="true"/>
   </TabsToShow>
   <Email>
     <add key="method" value="MAPI"/>
     <add key="SmtpServer" value="smtpserver.server.au"/>
     <add key="SmtpUsername" value="bob"/>
     <add key="SmtpPassword" value="password"/>
     <add key="from" value="from@from.com"/>
     <add key="to" value="to@to.com"/>
   </Email>
   <LabelMessages>
     <add key="general" value="An exception has occured"/>
     <add key="explanation" value="Please explain what happened"/>
     <add key="ContactTop" value="The numbers below may be used to contact support"/>
     <add key="ContactBottom" value="Some bottom message"/>
   </LabelMessages>
 </ExceptionReporter>

Last edited Jul 10, 2013 at 5:34 AM by PandaWood, version 3