Visual Studio 2012 Windows Phone 8 WCF - System.ServiceModel.CommunicationException

In Visual Studio 2012, I attemped to debug my WP 7.5 project which uses a WCF Service hosted on the same dev machine. I keep getting the following error:


Message: The remote server returned an error: NotFound.

The strange thing is that there is no problem invoking the service in a Console, but in WP Emulator no luck. All works fine with Visual 2012.

Last updated:5/1/2015 7:36:34 AM

1 Answers

Mayank Tripathi
Mayank Tripathi

That symptom indicates the service cannot be found.  Note that you cannot use localhost in your address, as you might have been doing in WP7, because the emulator is a completely different computer instance with its own internal localhost.

Before you can connect successfully from the emulator to the local web service, you have to make two changes:

You have to reconfigure the local web service and web server to accept 

connections from other devices on the network.

You have to reconfigure the service reference in the Windows Phone app to 

connect to the service by using the IP address of the development computer on 

which the service is running.

There are plans afoot to update the MSDN documentation to explain this in further detail.