title: Can't access WEB API with ip:port but can with localhost:port during VS debug mode
body: <p>I am trying to write an WEB API from .net and trying for my Android Application to query some data from the sql server database.</p>
  
  <p>I have the web api written and it works well in debug mode.</p>
  
  <p>My question is I notice the url of that application is <code>localhost:port</code> and it runs fine.
  However, when I try to change it to <code>MYIP:port (eg. http:192.168.X.1234)</code> or <code>MYHOSTNAME:port (eg win7home:1234)</code> this gives me <code>Bad Request - Invalid Hostname</code>.</p>
  
  <p>I know I can deploy this to IIS and my IIS is setup but I was just wondering how come it doesn't work in debug mode???  </p>
  
  <p>Is there a way for me to run it in debug mode and test in on my Android at the same time instead of having to deploy it every time I want to make a change?</p>