Does anybody actually use FaultReasonText to localize faults from WCF services?

572 views Asked by At

There is a localization mechanism in WCF that enables one to localize faults returned to client, via a FaultReasonText object that's a part of the fault.

The way this is done is that you pass all possible translations of the fault's message inside a collection in the FaultReasonText. This, I understand, is based on SOAP v1.2.

Does anyone actually use this mechanism? Isn't this wasteful in terms of bandwidth? Why would you send all possible translations to a client that is (probably) only interested in a specific language?

1

There are 1 answers

0
Michael Freidgeim On

FaultReason Class allows to store multiple translations if it's needed, e.g to cache possible fault descriptions in different languages.

However normally constructor FaultReason(FaultReasonText) will be used to Initialize a new instance of the FaultReason class using the specified text element that describes the fault in a specific language.