Using Replace Handler to get HandlingInstanceID

Topics: Exception Handling Application Block, Logging Application Block, Silverlight Integration Pack
Jun 2, 2011 at 2:33 PM

Hi ,

I m using Enterprise Library 5.0 silverlight integration pack for logging and exception handling in Silverlight Client.

I want to display handling Instance ID to my end user and a custom error message with that.

I have created a new "SanitizedException" class which derives from Exception base class. 

I am able to add this exception as replace handler in normal C# project with Enterprise Lib (without silverlight) by using exceptionMessage={handlingInstanceID} in web.config file.

But, I m not able to find any way to achieve the same using replace handler in silverlight. 


Please advice how should i achieve this. (preferably without using custom event handlers)




Jun 7, 2011 at 8:57 AM

Any updates on this?

Jun 7, 2011 at 9:47 AM

You just need to make sure to add some text in your Exception Message since in XAML configuration explicitly specifying the "{hanlingInstanceID}" alone won't work. Try something like;

<eh:ReplaceHandlerData ExceptionMessage="Handling Instance Id - {handlingInstanceID}" ReplaceExceptionTypeName="System.Exception, mscorlib" Name="Replace Handler" />


Gino Terrado
Global Technologies and Solutions
Avanade, Inc.