Silverlight TV 46: What's Wrong with my WCF Service?
- Posted: Sep 23, 2010 at 9:01 AM
- 39,472 Views
- 19 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- High Quality WMV (PC, Xbox, MCE)
- MP3 (Audio only)
- MP4 (iPod, Zune HD)
- Mid Quality WMV (Lo-band, Mobile)
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:
- John's blog and on Twitter (@john_papa)
- The Silverlight Web Services team blog
- John's MSDN Magazine article on faults and Silverlight
- Yavor's MIX talk on debugging
- Debugging walkthrough
- More details on faults
- http://www.fiddler2.com/
- Fiddler extension for binary WCF Silverlight messages
Follow us on Twitter @SilverlightTV or on the web athttp://silverlight.tv
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.
Follow the Discussion
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.
Great video! Definitely helps locating the small issues that can often lead to hours of searching.
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
@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?
You can also use a dot after localhost (e.g. http://localhost.:PORTNUMBER/) in order to be caught by fiddler.
@jthompkins: yes, I am uploading those links now. My mistake!
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
@Jatin Mehta: I just updated the post above with those links. Sorry for the delay.
Yavor and I are planning a follow up epsiode to get into authentication. Any ideas of things you really want to see Yavor do?
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
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.
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.
,and one last thing i want to say why don't you call any vb person in your show.......
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