title: Cordova Angular Get to Web Api Connection Refused
body: <p>I am using Visual Studio 2013 Update 4 and I have a web api project setup to receive get requests that returns an array. For the client app I have setup cordova and am emulating an android angular app using ng-resource to call the web api get. Everytime I call the GET I get a ripple.js error that says connection refused. I get the connection refused even if I try with a real android device as well. Here is the error when using the ripple emulator</p>
  
  <p>OPTIONS <code>http://****:4400/ripple/xhr_proxy?tinyhippos_apikey=ABC&amp;tinyhippos_rur…Fget%3D%257B%2522method%2522%3A%2522GET%2522%2C%2522array%2522%3Atrue%257D net::ERR_CONNECTION_REFUSED</code></p>
  
  <p>I was sure to enable cors on the web api 2 server since the cordova and web api projects are different port numbers on the same local host. I proved not only the cors functionality but also the code by creating an exact replica of the cordova angular app with just angular web page. I also tried with postman and both get json responses correctly. It is only the cordova android app that is giving me the connection refused. Any help would be greatly appreciated!</p>
  
  <p>Here is what the angular get looks like</p>
  
  <pre><code>app.factory('mrMaintService', function ($resource) {
      return $resource('http://localhost:15528/api/requests', {
          get: { method: 'GET', array: true }
      });
  });
  </code></pre>
  
  <p>This shows I am allowing all domains on the web api project:</p>
  
  <pre><code> &lt;httpProtocol&gt;
    &lt;customHeaders&gt;
      &lt;add name="Access-Control-Allow-Origin" value="*" /&gt;
    &lt;/customHeaders&gt;
  &lt;/httpProtocol&gt;
  </code></pre>