XML•Control EMAB With a Config File

Listing 1. The App.config file lets you perform functions such as turning EMAB on or off and specifying which log EMAB uses. Here you specify the name of the log and the way the name of the application will appear.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <configSections>
      <section name="exceptionManagement" type=
   "Microsoft.ApplicationBlocks.
      ExceptionManagement.
   ExceptionManagerSectionHandler,
   Microsoft.ApplicationBlocks.
      ExceptionManagement" 
      />
   </configSections>
<exceptionManagement mode="on">   
   <publisher assembly="Microsoft.ApplicationBlocks.
   ExceptionManagement" 
      type="Microsoft.ApplicationBlocks.
   ExceptionManagement.DefaultPublisher" 
      logname="emabLog" 
   applicationname="C# EMAB Client" />
   </exceptionManagement>
</configuration>