title: Debugging an ASP.NET MVC application on an Android phone
body: <p><strong>Objective</strong></p>
  
  <p>I'm looking for the simplest-possible, step-by-step setup process for debugging my ASP.NET MVC 4 application using my IP address as the URL. I want to be able to access the application from my Android phone, which is connected to my local network via Wi-Fi, using my computer's local IP address (e.g. - <code>http://192.168.1.109:25968</code>). I'm running Visual Studio 2012 RC on Windows 7.</p>
  
  <p>This question has been addressed by two other questions (<a href="https://stackoverflow.com/questions/5901224">this one</a>, and <a href="https://stackoverflow.com/questions/4515724">this one</a>), but the answers are extremely brief and aren't helping me at all. I've had to resolve this issue before by banging on my computer and mindlessly changing every setting until something worked. I don't want to have to go through that again. I want to understand what I'm doing this time.</p>
  
  <p><strong>Setup Information</strong></p>
  
  <p>The project is just a default ASP.NET MVC 4 Internet Application. I'm pretty sure I haven't changed anything yet.</p>
  
  <p>The Web tab in my application's Properties is set to "Use Local IIS Web Server", and I have "Use IIS Express" checked. The Project url is <code>http://localhost:25968/</code>. I see that the "locahost" there might be a problem, but VS won't let me put in an IP address or wild cards.</p>
  
  <p>My IIS Express applicationhost.config file for my application are as follows.</p>
  
  <pre><code>&lt;site name="APPLICATION_NAME" id="13"&gt;
      &lt;application path="/" applicationPool="Clr4IntegratedAppPool"&gt;
          &lt;virtualDirectory path="/" physicalPath="C:\Users\USERNAME\Documents\Visual Studio 11\Projects\APPLICATION_NAME" /&gt;
      &lt;/application&gt;
      &lt;bindings&gt;
          &lt;binding protocol="http" bindingInformation="*:25968:localhost" /&gt;
      &lt;/bindings&gt;
  &lt;/site&gt;
  </code></pre>
  
  <p><strong>What's Happening</strong></p>
  
  <p>When I connect to the site from the host computer with <code>http://localhost:25968</code> it works great. If I try to use <code>http://192.168.1.109:25968</code> from the host computer, I get "Bad Request - Invalid Hostname, HTTP Error 400. The request hostname is invalid." Using this same URL from another computer on the network, it  just times out.</p>