title: IIS7.5 Deployment for Asp.Net Web API
body: <p>I have gone through all the steps to deploy my Web API in IIS 7.5 on windows server 2008R2 machine in Amazon cloud services. There are other WCF services working on this that can be accessed externally (outside the server) and internally (on the server). so I would like to know where I am going wrong.</p>
  
  <p>I just created a default web api application. You know the one, with the values controller that returns ["Value1","Value2"]. And deployed it.</p>
  
  <p>The steps I follow are:</p>
  
  <ol>
  <li>Create an appropriately named app pool with .Net 4.0 / Integrated selected.</li>
  <li>Added a website, selected the app pool in 1, filled in the physical path to my site, gave the relevant http settings (selecting in turn each of the 3 options available to me, All unassigned, ::1, and my machine IP as AAA.BBB.CCC.ETC) and changed the port as both 80 and 8080 are used. So I just used 8081.</li>
  <li>Then I unlocked port 8081 in the firewall (just because I taught it might be needed even though the others didn't seem to, I could be wrong about this so I even temporarily turned off my firewall but it still didn't work).</li>
  </ol>
  
  <p>The trick is, when I leave off the binding altogether... that being...If I go into edit bindings. Click on the binding and select edit. Then remove the text in the host name text box. My api works internally (on the server). But I cant access it externally (from another computer). I get "This page cannot be displayed".</p>
  
  <p>When I put the host name back, I cannot get it either internally or externally.</p>
  
  <p>I also cannot get it by typing the IP address of the server even with the port.</p>
  
  <p>As I am using a server in amazon cloud services I am curious if there is some setting I need to do external to the server to make port 8081 available to the outside world? In Azure you need to make the port available outside. I don't know how to do this in Amazon if it's needed.</p>
  
  <p><strong>Just to eliminate false positives:</strong>
  I am aware that .Net 4.5 is a subset of the .Net 4.0 framework and therefore I have researched extensively that my apps should (and indeed does) work even though I can only select .Net 4.0 in the app pool (see after point 3). So I know this is not the problem.</p>
  
  <p>Any help would be appreciated. Let me know if I can clarify any part of the question.</p>