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
Check web.config file for invalid entries. For example, having "entityFramework" tag there causes this problem for me.
For me the problem was solved by closing down Visual Studio, deleting
project.lock.json
and starting Visual Studio again.
Edit: I was using RC1.
For what it's worth, this is a generic error message that could serve as a red herring to any number of issues where the httpPlatformHandler can't launch the given executable (dnx in this case).
In my case I received this error as a direct result of misunderstanding the launchSettings.json file. I was trying to enable the https endpoint for my application and mistakenly duplicated the sslport in my applicationUrl. As I understand it the applicationUrl should be the http hostname/port of the application and by filling in the sslPort it just configures the IIS Express environment to listen for https on the hostname given in the applicationUrl on the port provided in sslPort.
For example:
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:44000",
"sslPort": 44300
}
}
Provides the following two endpoints on localhost.
If you were to have the same port in the applicationUrl and sslPort settings, you would receive the error associated with this thread.
This is true for me on RC1
I hit this problem due to the project config trying launch https://localhost instead of http. Right click on the webproject, under "Debug" and adjust "App URL" to be http instead of https.
Another way to get around this was switching the launcher from "IIS Express" to "Web"
It is possible to upgrade, i found i had to look through the new updated templates here.
Update your web.config in wwwroot to include:
<httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" stdoutLogEnabled="false" startupTimeLimit="3600"/>
You will also need to change the way the project debugs using Kestrel by modifying your project.json:
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"dependencies": {
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-beta8",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8",
}
and modifying your hosting.ini
server=Microsoft.AspNet.Server.Kestrel
and adding this to the Configure method in startup.cs
// Add the platform handler to the request pipeline.
app.UseIISPlatformHandler();
adding these references should allow you to run the project.