Symptoms
This article describes the Microsoft Application Blocks for .NET topic “Exception Management Application Block Overview.”
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.
Resolution
“Exception Management Application Block Overview” 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.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 ExceptionsReferencing the Exception Management Application BlockConfiguring 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)Appname.exe.config (for a Windows-based application)You can also apply configuration settings at the computer level by using the Machine.config file.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.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 classThe ExceptionManagerSectionHandler classThe ExceptionManager classThe ExceptionManagerInstaller classThe DefaultPublisher classThe IExceptionPublisher interfaceThe IExceptionXmlPublisher interface