help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

Exception Management


To build successful and flexible applications that can be maintained and supported easily, you must adopt an appropriate strategy for exception management. You must design your system to ensure that it is capable of the following:

  • Detecting exceptions.
  • Logging and reporting information.
  • Generating events that can be monitored externally to assist system operation.

Spending the time at the beginning to design a clear and consistent exception management system frees you from having to piece one together during development, or worse still, from having to retrofit exception handling back into an existing code base.

An exception management system should be well encapsulated and should abstract the details of logging and reporting from the application's business logic. It should also be capable of generating metrics that can be monitored by operators to provide an insight into the current health and status of the application. This helps to create an application that can quickly and accurately notify operators of any problems it is experiencing, and can provide valuable information to assist developers and support services with problem resolution.


Exception Management in

As base for the Exception Management the Axinom Enterprise CMS uses the Exception Management Application Block by Microsoft. Further details at Microsoft Developer Network (

Should an exception occur and not be intercepted, the user receives a general error page (error.htm) and the exception information is documented (“published”).

Configuration of the Exception-Management:

Several ExceptionPublishers are available to you, in addition you can develop (have them developed) your own ExceptionPublishers. Standard setting is ExceptionPublisherFile.


Microsoft.ApplicationBlocks.ExceptionManagement" />



Name Producer Target Description
ExceptionPublisherFile Axinom File Only the last Exception will be stored.
Parameter: File
Note: Write access for the ASPNET-User for the mentioned file.
ExceptionPublisherMail Axinom E-Mail An E-Mail will be sent per exception to an operator.
Parameter: Operator, Subject, From
Note: SmtpServer has to be set up correctly at AppSettings
DefaultPublisher Microsoft EventLog Parameter: logName, applicationName
Note: Write access for EventLog. Are usually assigned by CMS-Installer. If not, you can do it manually with installutil.exe. You will find an example in the CMS at installation\ConfigureExceptionPublisher.bat.
CustomPublisher Any required method to transfer
exceptions to the developers
I.e. save in a data base.
ExceptionPublisher Axinom Mail/File
Obsolete, not any longer supported.

With on/off the respective ExceptionPublisher can be switched on and off.

If a Messaging System like Microsoft Exchange is used, we recommend the ExceptionPublisherMail and a Public Folder as address for the exceptions.



If the exceptions file was not stored:
Make sure that the ASPNET-User has write access for the mentioned file.
According to the web.config settings only the last Exception might be stored, to avoid that add overwrite="false"

If the exception mail was not sent:
Make sure that the SmtpServer has set up correctly at AppSettings

If your application throws a security exception, then something in your exception management is not configured well. then tries to write exception in Event Log. To be able to do this, it must be allowed. Please run following command in commandline to allow writing in EventLog:

%WINDIR%\Microsoft.NET\Framework\v1.1.4322\installutil C:\Projects\AxCMS_Sample\Components\Components\Microsoft.ApplicationBlocks.ExceptionManagement.dll

Please have a look in our forum too...


Use exception management in your related application (importer, create application)

To be able to use our mail sending exception management you have to init smtp server in your application:

System.Web.Mail.SmtpMail.SmtpServer = CMSConfigurationSettings.SmtpServer;