I am working on a .Net Remoting project. and I want to monitor the remote calls and returned values or possible exceptions. I Implemented the IMessageSink
Public Function SyncProcessMessage(ByVal msg As System.Runtime.Remoting.Messaging.IMessage) As System.Runtime.Remoting.Messaging.IMessage Implements System.Runtime.Remoting.Messaging.IMessageSink.SyncProcessMessage
Dim replyMsg As IMessage = _NextMessageSink.SyncProcessMessage(msg)
if {ReplyMsg Contains Exception of type a} then
do something
else if {ReplyMsg Contains Exception of type b} then
do someshing else
End If
Return replyMsg
End Function
when the service throws an exception ReplyMsg only contains the LogicalCallContext. how can i find the exception types?