i have build a global exception handling for my wcf application. I have a class that implements 'IErrorHandler' and handles the exception. I can register the ErrorHandler with a 'IServiceBehavior' attribute. (So i don't need to touch every function)
I use the class 'FaultException' to wrap my exception object.
Dim sysEx As SystemException = 'Do Convert
Dim fex As New FaultException(Of SystemException)(sysEx, sysEx.Message)
Dim faultMessage As MessageFault = fex.CreateMessageFault
fault = System.ServiceModel.Channels.Message.CreateMessage(version, faultMessage, fex.Action)
Now I can retrieve the error message at client side. But unfortunally I can't retrieve the original exception type or the original stacktrace.
Is there an easy option to solve the problem without adding 'FaultContract' to each function in my service?
Thank you