title: Running multiple IIS Express instances on the same port through Visual Studio
body: <p>I currently have sites configured in IIS Express for each of the applications I've been working on. Each of them are set to run locally on ports 80 and 443, but have separate bindings (<a href="http://site1/" rel="noreferrer">http://site1/</a> and <a href="http://site2/" rel="noreferrer">http://site2/</a>) with those aliases pointing locally from within my hosts file.</p>
  
  <p>I can start these sites at the same time when launching IIS Express directly (from the command line), but letting VS2010 launch them when debugging is unsuccessful. The first site will launch and debug as it should, but the second site to start generates an error: "Unable to launch the IIS Express Web server. Port '80' is in use."</p>
  
  <p>Here's the IIS Express configuration I'm using (slightly modified to remove project names):</p>
  
  <pre><code>&lt;site name="Site1" id="1" serverAutoStart="true"&gt;
      &lt;application path="/" applicationPool="Clr4IntegratedAppPool"&gt;
          &lt;virtualDirectory path="/" physicalPath="Site1Path" /&gt;
      &lt;/application&gt;
      &lt;bindings&gt;
          &lt;binding protocol="http" bindingInformation="*:80:Site1" /&gt;
          &lt;binding protocol="https" bindingInformation="*:443:Site1" /&gt;
      &lt;/bindings&gt;
  &lt;/site&gt;
  &lt;site name="Site2" id="2" serverAutoStart="true"&gt;
      &lt;application path="/" applicationPool="Clr4IntegratedAppPool"&gt;
          &lt;virtualDirectory path="/" physicalPath="Site2Path" /&gt;
      &lt;/application&gt;
      &lt;bindings&gt;
          &lt;binding protocol="http" bindingInformation="*:80:Site2" /&gt;
          &lt;binding protocol="https" bindingInformation="*:443:Site2" /&gt;
      &lt;/bindings&gt;
  &lt;/site&gt;
  </code></pre>
  
  <p>It would appear that VS is doing a check for anything currently listening on port 80, whereas IIS Express isn't restricted in that fashion. I can still have VS attach to the instances of IIS Express that were started by command line, but I'd prefer to have VS manage them.</p>
  
  <p>Is this a limitation on how VS2010 handles IIS Express, and if so, what's a good workaround?</p>