Home > DeveloperSection > Forums > Visual Studio 2012 Windows Phone 8 WCF - System.ServiceModel.CommunicationException
ben reitman
ben reitman

Total Post:96

Posted on    May-01-2015 2:18 AM

 Windows Phone Windows Phone  Windows Phone 8  Windows Phone 7 

 1 Reply(s)
 454  View(s)
Rate this:

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.

Mayank Tripathi
Mayank Tripathi

Total Post:397

Posted on    May-01-2015 7:36 AM

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.

Don't want to miss updates? Please click the below button!

Follow MindStick