Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An error occurred attempting to determine the process id of the DNX process hosting your application

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 hosting your application

Is there a way to fix the problem?

like image 998
Domysee Avatar asked Oct 16 '15 09:10

Domysee


3 Answers

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.

like image 81
Frode Lillerud Avatar answered Oct 15 '22 17:10

Frode Lillerud


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.

like image 34
Domysee Avatar answered Oct 15 '22 17:10

Domysee


For other people having this problem, in cases in which the other solutions don't work - I found the answer in this thread: Forcing to use SSL: An error ocurred attempting to determine the process id of the DNX process hosting your application

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.

like image 30
Radosław Chybicki Avatar answered Oct 15 '22 17:10

Radosław Chybicki