SYSTEM.SERVICEMODEL.COMMUNICATIONEXCEPTION TO CONSUME WCF REST SERVICE FROM WINDOWS PHONE 8

ben reitman

Total Post:96

Points:676
Posted by  ben reitman
 1632  View(s)
Ratings:
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)- 169.254.143.163. 4. Status of vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch) is- Unidentified network. 5. IP of WCF Service- 192.168.20.233 6. IP of Client - 192.168.20.234 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.

  1. Mayank Tripathi

    Post:397

    Points:3117
    Re: System.ServiceModel.CommunicationException to consume WCF Rest Service from Windows Phone 8

    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?

      Modified On Apr-09-2018 05:27:23 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!