I have a service where every operation can respond with the same custom fault type. I have this working fine by applying the FaultContract attribute to every operation like so:
[OperationContract]
[FaultContract(typeof(MyFault))]
public string Operation1();
[OperationContract]
[FaultContract(typeof(MyFault))]
public string Operation2();
etc, etc,...
From looking in Reflector, I can see that the FaultContractAttribute can only be applied to methods....so my question is:
Can fault contracts be declared at a higher level than operation (i.e. ServiceContract, Endpoint, Service)?