0

I am using MessageContracts for my WCF services; I am grouping various DataContracts into a single MessageContracts. My base response is contains - isOperationSuccess (bool), exceptionMessage (Exception). If an error occurs at service level, I am assigning into exceptionMessage and setting the isOPerationSuccess to false; and returning the response.

Do I still have to handle / catch the FaultContract at client (my service includes a FaultContract attribute?

My question is where do I need to use FaultContract with MessageContracts?

2 Answers2

0

If the operation has a FaultContract attribute on it, then it may return a fault. Of course your client should handle that.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
0

If the operation has a FaultContract attribute on it, then it may return a fault. Of course your client should handle that.

Of course client has to handle it; but if you look at my response message, it includes an exception object into which I am filling the server exception. In this scenario, do I have any condition where I'll get a FaultContract?