title: Consume web services via LAN
body: <p>I have web services running on my machine on a local network. Instead of connecting to them via <code>localhost</code>, I'd like to be able to connect to them via local IP - in this case <code>192.168.1.5</code>. Once I can do this, I'll know other devices on the network can consume these web services too (in particular, my android phone).</p>
  
  <p>In my project setup in <code>Visual Studio 2013</code> (I am using IIS Express), if I set the project url to be <code>http://testdomain.com:52252</code> and set the line in my hosts file for <code>192.168.1.5 testdomain.com</code>, then connecting to <code>testdomain.com:52252/testservices.asmx</code> works just fine. However when I change the project url to <code>http://192.168.1.5:52252/</code> and connect straight to <code>192.168.1.5:52252/testservices.asmx</code> it returns <code>Bad Request - Invalid Hostname. HTTP Error 400. The request hostname is invalid.</code></p>
  
  <p>What is an effective way of testing web services on a local network? I need to develop and test web services and test them from an android device, but I am disallowed from developing/testing them on a live server at the moment. Are there any solutions to this?</p>
  
  <p>I have looked for solutions online but have been unable to find any. I find it hard to believe there is not a common solution to this issue - surely people must have a way to test web services without hosting a server or connecting via <code>localhost</code>?.</p>