title: 'Bad Gateway' error when loading aspnetcore RC2 default website project
body: <p>I am attempting to run the default ASP.NET Core Web Application (Web Application Template in VS 2015) via IIS.</p>
  
  <p>I have followed the instructions from the docs <a href="https://docs.asp.net/en/latest/publishing/iis.html" rel="noreferrer">here</a> eg setting up a 'No Managed Code' application pool and pointing the Physical Path at the location of the <code>web.config</code> file.</p>
  
  <p>When I attempt to browse to the website root, <code>http://localhost</code> I am getting this error:</p>
  
  <blockquote>
    <blockquote>
      <p>HTTP Error 502.3 - Bad Gateway There was a connection error while trying to route the request.</p>
    </blockquote>
    
    <p>Most likely causes: The CGI application did not return a valid set of
    HTTP errors. A server acting as a proxy or gateway was unable to
    process the request due to an error in a parent gateway.</p>
  </blockquote>
  
  <p>The event viewer states:</p>
  
  <blockquote>
    <p>Failed to start process with commandline 'dotnet ./bin/Debug/netcoreapp1.0/WebApplication2.dll', Error Code = '0x80004005'.</p>
  </blockquote>
  
  <p>This error shows I have replaced the placeholders</p>
  
  <pre><code>&lt;aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%"
  </code></pre>
  
  <p>in <code>web.config</code> with the required values</p>
  
  <pre><code>&lt;aspNetCore processPath="dotnet" arguments="./bin/Debug/netcoreapp1.0/WebApplication2.dll"
  </code></pre>
  
  <p>(<strong>update</strong>: these placeholders are replaced when you publish)</p>
  
  <p>As per the troubleshooting instructions I have installed <code>.NET Core Windows Server Hosting Bundle</code> and restarted the server.</p>
  
  <p>Running from the command line via <code>dotnet</code> works</p>
  
  <p>Wondering what to try now.</p>