IIS Express + HttpPlatformHandler Error When Starting ASP.NET 5 RC1 Application

After upgrading from ASP.NET 5 beta 7 to RC1, an attempt to start a web application in IIS Express from Visual Studio ends with "Error trying to determine the process ID of the DNX process where your application is hosted."

In the Windows event log, I see the following errors:

  • Failed to start process "1828". Port = 31115, Error code = '-2147024891'. (EventID 1000, it's always)
  • Warning: Failed to create stdoutLogFile \? \ C: _temp_httpplatform-stdout.log_6072_2015128124832.log, ErrorCode = -2147024864. (EventID 1004, this only happens sometimes)

The log files configured in the HttpPlatformHandler Configuration are created but completely empty, as well as the VS output window.

How can I diagnose the cause of the failure?

Relevant Versions:

  • Visual Studio Enterprise 2015 Update 1
  • DNX SDK Version: 1.0.0-rc1-update1
  • Windows 7 Enterprise SP1 (64-bit)

Relevant sections from web.config:

<system.webServer> <handlers> <add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /> </handlers> <httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="true" stdoutLogFile="C:\_temp\_httpplatform-stdout.log" startupTimeLimit="3600" forwardWindowsAuthToken="false" /> </system.webServer> 

What may be interesting is that initially, when I tried to launch a completely new ASP.NET 5 web application created from a template, it worked. Now this is also not so.

UPDATE . Despite the error triggered by IIS Express, it returns error 502.3 Bad Gateway

+8
asp.net-core iis-express
source share
4 answers

So, one colleague had a similar problem.

I have finished checking the .vs \ config \ applicationhost.config file in the project. It turned out bad, sites>. On two sites, https were bound to "*: 44300: localhost". I deleted one (the one that also bound http to 80), renumbered sites, and now its IIS Express is working.

+1
source

I just solved this problem for my sites ("An error occurred while trying to determine the process ID of the DNX process where your application is located") - the same boat, upgraded from Beta 7 to RC1. I believe that these projects were originally created in Beta 4 or 5.

It turns out that in my web.config extra garbage was added from earlier versions of the beta version of ASP.Net, and they dropped the request.

I deleted them:

  <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <remove name="OPTIONSVerbHandler" /> <remove name="TRACEVerbHandler" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> 

And the sites started working properly in IIS Express. If this does not work for you, you can try to create a new project and make sure that it works correctly - compare the web.config, startup and project.json files to see if there are any changes that you need to make.

+1
source

I had the same problem when I started a project through IIS Express. I received the message "An error occurred while trying to determine the process ID of the DNX process where your application is hosted." I tried to repair VS, reinstall IIS, but nothing worked. And the next morning I found a solution to asp toling known problems . Just reinstall ASP.NET 5 RC1.

0
source

I have the same problem.

In the project.json file. My code was

 "version": "1.0.0-rc1-update", 

I change it to

 "version": "1.0.0-rc1-update1", 

Because in the launchSettings.json file I have "sdkVersion": "dnx-clr-win-x64.1.0.0-rc1-update1" .

It must match the sdk version in launchSettings.json.

0
source

All Articles