I'm running a service through ASP.net/Visual Studio that's being developed in conjunction with an Android app. When I run the service through VS, it's accessible at http://localhost:13980/
but not http://127.0.0.1:13980/
(which gives a "bad request - invalid hostname" 400 error). Obviously, I can't tell the Android app to look for a service at "localhost" since that'll be pointing at itself.
I understand (according to this page) that the Android emulator treats 10.0.2.2 as a pass-through IP address to the host machine's 127.0.0.1, so it would stand to reason that everything would come together if I a) got localhost to be properly exposed through 127.0.0.1, and b) changed the target address in the app from localhost:port to 10.0.2.2:port.
How would I go about doing part A? I'm running Windows 8.1 Pro, Visual Studio 2012, and the project in question is targeting .NET 4.5.
Thanks!