Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

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

Download

Right click “Save as…”

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 athttp://silverlight.tv 

Tags:

Follow the Discussion

  • shaggygishaggygi

    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?
    Thanks.
     

  • Danny CabreraDanny Cabrera

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

  • CattoCatto

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

  • @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.

    Cheers,
    -Yavor

  • shaggygishaggygi

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

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

  • andreigaandreiga

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

  • John Papajopapa Development Shaker

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

  • Jatin MehtaJatin 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...
    Thanks

  • John Papajopapa Development Shaker

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

  • John Papajopapa Development Shaker

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

  • Bill CampbellBill Campbell

    Hi,
    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.
    regards,
    Bill

  • Tuskan360Tuskan360

    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.

  • ,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.......

  • kenken

    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 !
    thanks.

  • 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...

    Anthony

  • 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?

    Peter

  • @ken:

    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.

  • Hi, the video is not working!

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.