I would like to handle an EndpointNotFoundException in my orchestration.
I add a new exception handler
scope synchronized = false
exception object type = System.ServiceModel.EndpointNotFoundException (this object type doesn't work)
exception object type = System.ServiceModel.CommunicationException (this object type doesn't work)
exception object type = System.SystemException (this object type worked. which i don't want)
Any idea on how to catch such exceptions in orchestration ?
This seems to be a common issue - e.g. here and here. I concur with you if I catch a basic System.Exception
that the type being caught is System.ServiceModel.EndpointNotFoundException
with an inner System.Net.WebException
.
Although not directly answering your question, why not mark the port as Delivery Notification = Transmitted
, and then catch the DeliveryFailureException?.
This way, you decouple your orchestration from the specific adapter (WCF), and if you change your transport (or add a backup transport etc), the exception handling will still work.
Edit : Scott Colestock mentions a hack to catch internal exceptions - something similar might work for the original requirement