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.
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:
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.
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.
I used RC1 and EF First Code Approach. Good idea to start investigation is to run project with option: "Start project without debbuging" (Ctrl+F5). Then I get more meaningful error for me: "The configuration section 'entityFramework' cannot be read because it is missing a section declaration." It didn't work for me because of web.config file.
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"
I your project uses or enforces SSL run it without debugging (CTRL+F5) first, it will ask you to generate a local SSL cert, and after that debugging will work and the error will be gone.
There are just so many things that could cause this error. Here are a few that worked for me:
Just delete the web.config in your wwwroot folder. It will get recreated correctly on compilation.
If you are trying to use SSL and in your IIS Express and moving your SSL Cert to the Trusted Root Certification Authorities folder didn't work. In the Debug tab of the Properties of the project you are trying to run. Try unclicking the Enable SSL checkbox and then clicking it again to enable it and get a different port. You may have to do this a few times.
Assuming you are running IIS Express with SSL Enabled depending on your installation you will have to put your IIS Express Development Certificate(Issued To "localhost"/ Issued By "localhost") in either [Local Computer\Personal\Certificates] or [Local Computer\Trusted Root Certification\Certificates]. One of those should work. (Using Windows 10 + VS2015). HTH
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.
I started my application without debugging CTRL+F5.
I was then presented with an option to accept a self-signed certificate for localhost.
I followed the prompts and then I was able to visit my application using the AppUrl I copied over after enabling SSL in project debug settings.
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.
Another potential solution
For anyone playing with SSL settings, I found just changing the SSL port in the launchSettings.json file to another nearby port solved the problem.
FYI, I couldn't find anything on the machine using the original port, nor did I get a port in use error.
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.