Silverlight 4 101: Debugging WCF RIA Services

By default, he error messages that are generated from WCF RIA Services are less than useful. They are often generic messages that do little to help you understand the root of the problem.

Fortunately, there is a great tool, called Fiddler ( that provides solid, detailed information on your errors.

After downloading and installing Fiddler, do the following:

1. Open your Web project’s web.config file and look within the <system.serviceModel> node to make sure the following <serviceBehaviors> node exists beneath the <behaviors> element:

      <behavior name=“WCF_ReaderQuotaIssue.Web.ServiceBehavior”>
        <serviceMetadata httpGetEnabled=”true”/>
        <serviceDebug includeExceptionDetailInFaults=”true”/>
        <dataContractSerializer maxItemsInObjectGraph=”6553600″/>

2. Launch Fiddler. Select the menu option Tools | Fiddler Options. In the General tab unselect the Enable IPv6 check box, then click OK to save changes (you only have to do this the first time you run Fiddler)

3. Close Fiddler and reopen it again so it picks up the change you made in the previous step

4. Re-launch Fiddler

5. Run your Silverlight application. After the web page loads, go to your browser’s address bar and add a period after “localhost” and before the colon as shown here, then press Enter to reload the page:


6. Now peform the action that is causing the error in your application

7. After the error occurs, ALT+Tab over to Fiddler and select the error (usually displayed in red) on the left side of the dialog. Then, go to the right side of the dialog, and click the Inspectors tab at the top and the TextView tab at the bottom to display the detailed error text

Best Regards,
Kevin McNeish
INETA Speaker
Eight-Time Recipient .NET MVP
Chief Software Architect, MM .NET Application Framework

Leave a Reply

Your email address will not be published. Required fields are marked *