Dealing with those pesky WCF CommunicationException “NotFound” errors in Silverlight
We have blogged and written about this before, but it keeps coming back as a major pain point when customers get started with WCF in Silverlight.
Out of the box, exceptions are not propagated from the WCF service to the Silverlight client. Instead, you get an annoying CommunicationException containing the text “NotFound”. This is not very useful at all when trying to debug your service.
There are two potential fixes to choose from: one is just on the client, the other one is just on the service. You can choose which fix suits you best. The fix on the client involves switching from the BrowserHttp to the ClientHttp networking stack. The fix on the server involves configuring a special WCF behavior. The pros and cons of each approach, and details on how to implement it are listed in this new topic we just published on MSDN.
While you’re debugging away, just wanted to make sure you had also seen this topic, which gives you detailed steps on how to debug your service.
Thanks,
-Yavor Georgiev
Program Manager, WCF
Comments
- Anonymous
August 26, 2011
One scenario that is not handled well is exceptions that occur in wcf serialization of returned data. In my case, an enum value was outside the listed enumeration values. My server code allowed the out-of-range value, but wcf quietly failed with no errors reported to the server or client, but simply returned NotFound to the client.