I am developing a distributed application. In it, there are roles and sets of permissions that I must validate.
Is a good pratice to throw an exception, in per example, unauthorized access?
Or should I send some message back to the client?
I am developing a distributed application. In it, there are roles and sets of
Share
On your service operation, you can specify a FaultContract that will serve both purposes like so:
Note that MyServiceFault must be marked with DataContract and DataMember attributes, in the same way you would a complex type:
On the service-side, you are then able to:
And on the client-side: