Domanda

I have a Windows Phone 8 Application and a WCF Service that implements Callback model. I'm having trouble configuring the service reference. I've tested the service using wsDualHttpBinding for a Windows Form Application Client instead the WP8 App, and it worked perfectly. However, this binding is not suitable for WP8 Apps and I have to change configuration. Can someone suggest me a simple working configuration for the service that works with my WP8 Application?

È stato utile?

Soluzione 2

As explain here: http://blogs.windows.com/windows_phone/b/wpdev/archive/2010/05/03/understanding-microsoft-push-notifications-for-windows-phones.aspx

the problem is due to the fact that it is not possible to implement something like a callback or publish/subscribe model between WP8 App and a Service. This is to avoid energy loss of the phone. So, Microsoft permits notifications from Service using the Microsoft Push Notification Service (MPNS). All is well-explained in the documentation linked above.

Altri suggerimenti

Right click on References and Select Add Service Reference

enter image description here

Type your WCF address

enter image description here

Click OK and you should see the Added Web Service

enter image description here

The Visual Studio will automatically implements the WCF service. Then you can use it

MyWebService.Service1Client client = new MyWebService.Service1Client();

I don't know if this can help you.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top