I am trying to connect a WCF service hosted at my local IIS express from an Android app. Currently, I am testing this on an Emulator.
Local URL for the service is http://locahost:40000/api/Authenticate
I knew that localhost is not going to work and I used 10.0.2.2 in the code
post = new HttpPost("http://10.0.2.2:40000/api/authenticate");
but the response on client execute is an "Invalid Hostname"
I tried editing the ApplicationHost.config of IIS express and added a binding entry for 10.0.2.2 but that didn't work too
Is there anything else that I am missing ?