Microsoft KB Archive/829026

= INFO: Microsoft Application Blocks for .NET - Exception Management Application Block Overview =

Article ID: 829026

Article Last Modified on 11/26/2007

-

APPLIES TO


 * Microsoft .NET Framework Software Development Kit 1.0 Service Pack 2
 * Microsoft .NET Framework Software Development Kit 1.0 Service Pack 2
 * Microsoft Windows XP Professional
 * Microsoft Windows 2000 Standard Edition

-



SUMMARY
This article describes the Microsoft Application Blocks for .NET topic &quot;Exception Management Application Block Overview.&quot;

The Exception Management Application Block provides a simple, extensible framework for handling exceptions. Without affecting your application code, you can do the following:
 * Log exception information to the event log by using only one line of application code.
 * Extend the application block by creating your own components that log exception details to other data sources or notify operators.

You can use the Exception Management Application Block as a building block in your .NET Framework-based application.



MORE INFORMATION
&quot;Exception Management Application Block Overview&quot; contains the following sections:  Introduction

The Exception Management Application Block is an exception management framework that you can use as a building block in your own .NET Framework-based application. If you use this block, you reduce the quantity of custom error handling code that you must create, test, and maintain. You may also make your application more robust and easier to debug.

The Exception Management Application Block helps you to do the following:  Manage exceptions in an efficient and consistent way. Isolate exception management code from business logic code. Handle and log exceptions by using minimal custom code.  What Does the Exception Management Application Block Include?

The Exception Management Application Block is made up of three Microsoft Visual Studio .NET projects, full source code, and comprehensive documentation. Downloading and Installing the Exception Management Application Block

A Microsoft Windows Installer file that contains the Exception Management Application Block projects, source code, and comprehensive documentation is available.

The install process creates a Microsoft Application Blocks for .NET menu on your Programs menu. An Exception Management menu appears on the Microsoft Application Blocks for .NET menu. The Exception Management menu includes options to start the documentation and to start the Exception Management Application Block Visual Studio .NET solution.</li> Using the Exception Management Application Block

This section discusses how to use the basic features of the Exception Management Application Block. For additional information about these topics, and other related topics, see the documentation that is included with the Exception Management Application Block download.

The topics that this section discusses include:  Publishing Exceptions</li> Referencing the Exception Management Application Block</li></ul> </li> Configuring the Exception Manager Application Block

You control the behavior of the Exception Management Application Block by using the following standard .NET Framework-based XML application configuration files:  Web.config (for an ASP.NET application)</li> Appname.exe.config (for a Windows-based application)</li></ul>

You can also apply configuration settings at the computer level by using the Machine.config file.</li> Extending the Exception Management Application Block

You may be satisfied with the functionality of the default publisher. The default publisher writes exception details to the Windows event log. However, you may want to develop your own custom publishers to log exception details to alternative locations or to notify operators (possibly through Microsoft Windows Management Instrumentation [WMI]), that an exception has occurred. This section discusses how to extend the functionality of the Exception Management Application Block.</li> Internal Design

This section discusses the main elements of the Exception Management Application Block. The main elements of the Exception Management Application Block are as follows:  The BaseApplicationException class</li> The ExceptionManagerSectionHandler class</li> The ExceptionManager class</li> The ExceptionManagerInstaller class</li> The DefaultPublisher class</li> <li>The IExceptionPublisher interface</li> <li>The IExceptionXmlPublisher interface</li></ul> </li></ul>

<div class="references_section">