Windows Phone 8.1 与 Xamarin Forms 和 WCF 服务

Windows Phone 8.1 with Xamarin Forms and WCF service

Windows Phone 8.1 与 WCF 服务存在任何不兼容性??

我正在开发一个使用 WCF 服务的 Xamarin Forms App Portable,在 Android 中工作正常但在 Windows Phone 8.1 中不工作并且没有错误或异常。

我从 Visual Studio 添加服务参考并以这种方式使用它:

IServicioWeb service = new ServicioWebClient();

var res = servicio.BeginMyValidateMethod(param1, param2, null, null);
var res_client = servicio.EndMyValidateMethod(res);

您必须按照说明使用 REST 实现 here:

Windows Phone 8.1 XAML applications does not support the System.ServiceModel namespace, and therefore you are not able to right click references in the project and choose Add Service Reference.
The recommended solution is to add a REST endpoint to your WCF endpoint, and access the WCF application through the REST endpoint using HttpClient.