Silverlight TV 46: What's Wrong with my WCF Service?

Play Silverlight TV 46: What's Wrong with my WCF Service?
Sign in to queue


WCF is an integral part of the communication stack for Silverlight applications, but sometimes things go wrong, very wrong. How do you fix those issues. In this episode of Silverlight TV, Yavor Georgiev from the WCF and Silverlight team shows you how to identfy the problems with your WCF services and how to fix them. He covers several topics including these:

  • Setting up your service
  • Debugging issues with "add service reference"
  • Handling Faults: How to get exceptions propogated from the sderver to Silverlight
  • How to use Fiddler to use with WCF
  • Using the new relative address feature in Silverlight 4

Relevant links:

Follow us on Twitter @SilverlightTV or on the web at 



Right click to download this episode

The Discussion

  • User profile image

    I was trying to connect to a service that gives me the error...
    Warning 2 Custom tool warning: Contract 'Eval' is not compatible with Silverlight 4 because it contains one or more operations with SOAP Encoding (use='encoded'). Only the non-encoded operations will be generated.
    Using Fiddler, it appears the service is setup on a Apache=Coyete/1.1 CJServer/1.1 server.
    Since the service is not created on my SL Web project, how and what file do I need to change on the server to make it compatible with my Silverlight project?

  • User profile image
    Danny Cabrera

    Great video! Definitely helps locating the small issues that can often lead to hours of searching.

  • User profile image

    Hey Now John,
    Great Vid! Yavor Georgiev  was good.
    Thx 4 the info,

  • User profile image

    @shaggygi - encoded is not supported in Silverlight at this point. If you don't control the service, you could consider building an intermediary WCF service that serves as a relay between Silverlight and the third-party service.

    If you are interested in updates on WCF support in Silverlight, follow me on Twitter at @digthepony.


  • User profile image

    @yavorg: Thanks for the update.  Hopefully there will be support for this in near future versions of SL.

  • User profile image

    Can we get the Silverlight debugging info link that was promised in the video?

  • User profile image

    You can also use a dot after localhost (e.g. http://localhost.:PORTNUMBER/) in order to be caught by fiddler.

  • User profile image

    @jthompkins: yes, I am uploading those links now. My mistake!

  • User profile image
    Jatin Mehta

    Great video..just wanted to know where we can get the links that were mentioned in the video for additional resources like seeing bindary data in fiddler etc...

  • User profile image

    @Jatin Mehta: I just updated the post above with those links. Sorry for the delay.

  • User profile image

    Yavor and I are planning a follow up epsiode to get into authentication. Any ideas of things you really want to see Yavor do?

  • User profile image
    Bill Campbell

    Great video and now I see the links here that I didn't on the original page. Thanks!
    Amy chance of show driving the creation of using a WCF service with TDD? The complications of the Async behavior for using SL unit tests is something that I haven't seen a demo on to actually do an integration test that is a vertical slice.
    Keep up the great work. These demos are really helpful to the dev community.

  • User profile image

    This was really interesting, it would be great if you could do a video at some point on how to handle a lnd log errors on the service side, e.g. With custom behaviours. I've sort of got this working but had to use an attribute on the web service class as I couldn't work out how to put it in the service configuration.
    @jopapa I look forward to the authentication episode: I usually find this the hardest part of each new silverlight project.. It would be great to see some info on how to configure the service side for authentication and also some best practices for tying in authorisation. And what bits should happen service side versus what should happen client side.
    Keep up the good work, these videos are really useful.

  • User profile image
    Atif Shahzad

    ,jopapa wrote

    Yavor and I are planning a follow up epsiode to get into authentication. Any ideas of things you really want to see Yavor do?

    John you are doing great efforts on silverlight tv, Iam working on RIA service since RC release and  espacially i love the interaction of MVVM with Silverlight is awesome John please do some depth videos on MVVM with RIA service if possible.Thankx.Angel,and one last thing i want to say why don't you call any vb person in your show.......

  • User profile image

    I sorry, I didn't quite catch how to do the 'one line exception handler', when i copy the line into my project, i get the error "WebRequestCreator does not exist in the current context.  There were some key stokes that i did not follow, can you please clarify that step !

  • User profile image

    Hi John

    I would like to add my thanks to many others for your work on Silverlight, which I have found so useful. WRT this video, I am using RIA services and would like to use a custom Fault to inform a Silverlight client about a data concurrency error. However the RIA Services domain service code seems to have a generic DomainServiceFault baked in to the generated code. Also, whatever kind of exception is raised in the WCF service a DomainException is raised on the Silverlight Client. Do you have any RIA service specific advice for when we want custom faults? Thanks...


  • User profile image

    Hi John and Yavor,

    This now really was an instructive and informative video. Finally I get Fiddler to cooperate with my localhost and/or the development server on any desired port.

    A a result of this I think I was able to find out why my service was not responding to requests. Fiddler says:

    No Proxy-Authenticate Header is present

    No WWW-Authenticate Header is present.

    So far so good, but WTH do I do to get rid of that?


  • User profile image


    Add the namespaces using System.Net; using System.Net.Browser;

    A very late reply, but often there's someone looking for answers to these things afterwards.

  • User profile image

    Hi, the video is not working!

Add Your 2 Cents