title: WCF service called from compact framework
body: <p>I have been trying to follow <a href="http://community.opennetcf.com/articles/cf/archive/2007/11/29/an-introduction-to-wcf-for-device-developers.aspx" rel="nofollow">this</a> article on communicating with a WCF service from a mobile device (using compact framework 3.5).  I have the service running on the desktop, and it tells me that it's running as:</p>
  
  <pre><code>http://localhost:1414/MyService.svc
  </code></pre>
  
  <p>I can see this in my client, but when I try to access it, I get this error:</p>
  
  <pre><code>There was no endpoint listening at http://localhost:1414/MyService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
  </code></pre>
  
  <p>So I did:</p>
  
  <pre><code>InnerException: {"No connection could be made because the target machine actively refused it"}
  </code></pre>
  
  <p>I am running from the emulator, which the article states did not work - I therefore suspect that I have encountered the same issue.  So my question is, does anyone know why this issue may occur?  </p>
  
  <p>EDIT:</p>
  
  <p>Just to clarify, this works fine when deployed to the device.  It's just the emulator that has the problem.</p>
  
  <p>EDIT:</p>
  
  <p>Thanks to @Shiraz Bhaiji I have made some progress with this now, but am now getting the error returned:</p>
  
  <pre><code>CFFaultException
  </code></pre>
  
  <p>This seems to be the only error information I can get, and it's caused by the call:</p>
  
  <pre><code>MyServiceServiceClient client = new MyServiceServiceClient(binding, endpoint);    
  returnString = client.MyFunc1();
  </code></pre>
  
  <p>I have changed the endpoint to reference my I.P. address directly as follows (the WCF service is running on my PC at the minute):</p>
  
  <pre><code>Binding binding = MyServiceServiceClient.CreateDefaultBinding();
  string remoteAddress = MyServiceServiceClient.EndpointAddress.Uri.ToString();
  EndpointAddress endpoint = new EndpointAddress("http://1.1.1.1/MyService/MyService.svc");
  </code></pre>