Archive for July, 2015

Unity + WCF + Silverlight: Async web service calls

July 28, 2015

As you may know, any of the XAML-based Windows Presentation Foundation (WPF) family does not allow synchronous calls from the UI thread. Calls must be performed asynchronously.

I was able to make a service reference via Visual Studio 2012 which automatically generated all the proxies with async methods (At first I was getting only the Begin/End methods. But then was able to get it to generate the “service.GetDataAsync” method with the corresponding “service.GetDataCompleted” callback event handler). But the problem was the Dependency Injection (DI) was failing.

For a long time I was dealing with the headache of this error where Unity was unable to resolve the DI-enabled WCF Services: (more…)

Advertisements