Handling faults when calling a service

When you're developing an application that relies on service calls from your client to your server, you'll probably want to have some kind of mechanism in place to allow feedback to the client when something goes wrong. You'll probably also want to know what went wrong so that you can take the necessary action on your client.

For this purpose, Silverlight supports Fault Exceptions when working with WCF services. In this recipe, we'll learn how to get this to work.

Getting ready

To follow along with this recipe, you can use the starter solution located in the Chapter07/HandlingFaults_Starter folder in the code bundle that is available on the Packt site. The finished solution for this recipe can be found in the ...

Get Silverlight 4 Data and Services Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.