WCF: Exception handling on OneWay OperationContract

1.1k views Asked by At

I am having a WCF duplex service with Silverlight client and .NET 3.5 WCF service.

The scenario I have is: during the duplex push OneWay operation from server to client if an exception happens in client notification handler the channel gets silently faulted so any further duplex calls from server timeout and fail. (As explained here One-Way Operations and Exceptions)

My question(s):

  1. Can I just decorate with FaultContract a OneWay OperationContract, wrap the exception on client and prevent faulting of the channel?
  2. if not, what would be some other way to catch the exception which occurred on the client during the duplex push from server?
1

There are 1 answers

0
yakya On

When you use OneWay OperationContract, the receiver should not reply nor the sender of the request should expect one.

  1. You can't.
  2. Your best bet is you can create another OneWay OperationContract between client and the service so that the service can send the fault to the client.