Home > DeveloperSection > Forums > System.ServiceModel.CommunicationException to consume WCF Rest Service from Windows Phone 8
ben reitman
ben reitman

Total Post:96

Posted on    May-01-2015 2:15 AM

 Windows Phone Windows Phone  WCF Data Services  Windows Phone 8 

 1 Reply(s)
 1389  View(s)
Rate this:
 When i try to connect to wcf service from windows phone 8 (vs 2013 pro 64 bit) an exception arises such as-

An exception of type 'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.ni.dll but was not handled in user code. Additional information: The remote server returned an error: NotFound.

My Code-
private void GetData()  
ADARA.WsBankUltimusCoreService.InterfaceToFetchServiceClient clientForTesting = new       ADARA.WsBankUltimusCoreService.InterfaceToFetchServiceClient();       clientForTesting.EnquiryAccountSummuryCompleted += new           EventHandler<WsBankUltimusCoreService.EnquiryAccountSummuryCompletedEventArgs>      (TestCallback); clientForTesting.EnquiryAccountSummuryAsync("0000217392", "1",               "mobilebanking", "QmkAc", "json");  
private void TestCallback(object sender,       WsBankUltimusCoreService.EnquiryAccountSummuryCompletedEventArgs e)  
var test = e.Result;  

Additional information- 1. Emulator can't access internet. 2. Network type- Static IP (not DHCP). 3. Emulator displays IP(Adapter-2)- 4. Status of vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) is- Unidentified network. 5. IP of WCF Service- 6. IP of Client - used tools- Service- VS 2012 Client- VS 2013 pro + Win phone 8.0

Both Client and Server exist in a same LAN, so wcf service is remote(not local) from client.

Mayank Tripathi
Mayank Tripathi

Total Post:397

Posted on    May-01-2015 7:35 AM

Don't know much about the problem but 169.254.x.x is the IP which is assigned by Windows as a fall-back when you have configured DHCP but no DHCP server can be reached. Is your Emulator network configured correctly?

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

Follow MindStick