title: Exposing a service running on localhost to an Android emulator?
body: <p>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 <code>http://localhost:13980/</code> but not <code>http://127.0.0.1:13980/</code> (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.</p>
  
  <p>I understand (<a href="https://stackoverflow.com/questions/5806220/how-to-connect-to-my-http-localhost-web-server-from-android-emulator-in-eclips">according to this page</a>) 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.</p>
  
  <p>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.</p>
  
  <p>Thanks!</p>