title: HTTP Error 502.3 - Bad Gateway Error returned while IIS Express is starting on Windows 10 - ASP.NET RC1 (update 2) MVC 6 web application
body: <p>I have the following issue while trying to start IIS Express using Visual Studio Professional 2015 to run an ASP.NET 5 MVC 6 web application - DNX RC1 (Update 2) on Windows 10:</p>
  
  <blockquote>
    <h2>Error Returned:</h2>
    
    <p><strong>HTTP Error 502.3 - Bad Gateway</strong><br/>
    The specified CGI application encountered an error and the server terminated the process.<br/><br/>
    <strong>Most likely causes:</strong><br/>
    - The CGI application did not return a valid set of HTTP errors.<br/>
    - A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.<br/><br/>
    <strong>Detailed Error Information:</strong><br/>
    - Module: httpPlatformHandler<br/>
    - Notification: ExecuteRequestHandler<br/>
    - Handler: httpPlatformHandler<br/>
    - Error Code: 0x80072ee2<br/></p>
  </blockquote>
  
  <p>The curious thing is that I started the same web application in a different operating system (Windows 7) and IDE (Visual Studio Community 2015). For this case I have no issues and web application runs properly. And I make sure to configure the same DNX as active on both operating systems (6.0.0-rc1-final). The only thing that vary is the framework architecture (Windows 7 =[x64] / Windows 10 =[x86]). </p>
  
  <p>Down below I am also providing relevant configuration files to complement findings:</p>
  
  <p><strong>1. project.json</strong></p>
  
  <pre><code>{
    "version": "1.0.0-*",
    "compilationOptions": {
      "emitEntryPoint": true
    },
  
    "dependencies": {
      "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
      "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
      "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
      "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
      "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
      "EntityFramework.Core": "7.0.0-rc1-final",
      "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
      "EntityFramework.Commands": "7.0.0-rc1-final",
      "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
      "Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
      "AutoMapper":  "4.2.1" 
    },
  
    "commands": {
      "web": "Microsoft.AspNet.Server.Kestrel",
      "ef": "EntityFramework.Commands"
    },
  
    "frameworks": {
      "dnx451": {
        "dependencies": {
          "AutoMapper": "4.2.1",
          "System.Net.Http": "4.0.1-rc2-24027"
        },
        "frameworkAssemblies": {
          "System.Data.Entity": "4.0.0.0"
        }
      },
      "dnxcore50": {
        "dependencies": {
          "System.Net.Http": "4.0.1-beta-23516"
        }
      }
    },
  
    "exclude": [
      "wwwroot",
      "node_modules"
    ],
    "publishExclude": [
      "**.user",
      "**.vspscc"
    ]
  }
  </code></pre>
  
  <p><strong>2. web.config (wwwroot)</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /&gt;
      &lt;/handlers&gt;
      &lt;httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" forwardWindowsAuthToken="false" startupTimeLimit="3600" /&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p><strong>3. global.json</strong></p>
  
  <pre><code>{
    "sdk": {
      "version": "1.0.0-rc1-update2"
    }
  }
  </code></pre>
  
  <p><strong>Finally, last topics that may help to find the error:</strong><br>
  - I am not pretty sure if httpPlatformHandler was installed correctly. <br>Where can I find it or make sure it is?<br> 
  - I have other web projects hosted on IIS Local, with virtual directories and assigned pools. How might this affect port's availability, considering that IIS Express is targeting into port 8000? (App URL: <a href="http://localhost:8000/" rel="nofollow">http://localhost:8000/</a>)         </p>
  
  <p>If you require additional information for this issue, please let me know.</p>
  
  <p>Thanks in advance!</p>
  
  <p>Karen G.</p>