I get this error message when I\'m trying to start the application.
An error occurred attempting to determine the process id of the DNX process host
When upgrading from beta7 -> beta8 I had this issue and the suggestions provided by Ben M and Domysee worked for me. However, one of my colleagues was still having problems running our project which targets dnxcore50
only. If you make sure you have run the following commands:
dnvm install 1.0.0-beta8 -r coreclr
dnvm install 1.0.0-beta8 -r coreclr -arch x86
It was the second command in particular that fixed it on his machine. You can also double-check this folder has a dnx.exe
in it:
%userprofile%\.dnx\runtimes\dnx-coreclr-win-x86.1.0.0-beta8\bin
Microsoft changed the hosting model as described in the release notes.
In project.json
replace the dependency
"Microsoft.AspNet.Server.IIS": "1.0.0-beta7"
with
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8"
In web.config
in the handlers
section remove every entry except
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
The complete web.config
will look like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
</handlers>
<httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/>
</system.webServer>
</configuration>
RC1: While using RC1 I had the error after moving the solution folder. After deleting the bin
and obj
folders everything worked again.
As user764754 noted, simply restarting Visual Studio can also help.
I've just discovered one more problem that was causing this!
web.config
in project root had some dodgy IIS URL rewrite rules to enforce HTTPS. Removing those rules solved the problem.
I had this trouble when I'm toggling settings and have disabled the "Enable Anonymous Authentication" in the Project > Properties > Debug. Make sure that it is enabled. Close and relaunched the project then try again. Hope this helps.
While following this tutorial I received a similar error.
First, I received the error: "An error occurred attempting to determine the process id of dotnet.exe..." I took the following steps.
While trying a few things to solve that error I also came across this error. "An error occurred attempting to determine the process id of the DNX process hosting your application"
Which was caused by having another instance of the application running.
I hope this answer helps someone.
In my case in an asp net core 1.1, .net framework 4.5.2 project, the error did not refer to dnx since that is no more. Instead it referred to the project name exe. Another version of the error referred to simply being unable to connect to iis express.
The problem was the introduction of a canonical host name rewrite rule that tries to force all connections to have a host name that begins with www. e.g. redirecting gty.org to www.gty.org to conform to our ssl cert. This is fine in production but you can't force https://localhost:44347/ to begin with www and expect iis express to be able to handle it.
<rule name="CanonicalHostNameAddwww" enabled="true" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" negate="true" pattern="^www\." />
</conditions>
<action type="Redirect" url="http://www.{HTTP_HOST}{HTTP_URL}" appendQueryString="false" redirectType="Permanent" />
</rule>
The solution was to comment out the rule when running in visual studio or add a condition:
<add input="{HTTP_HOST}" negate="true" pattern="^localhost" />