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

前端 未结 17 922
南方客
南方客 2020-12-01 04:03

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

相关标签:
17条回答
  • 2020-12-01 04:36

    Check web.config file for invalid entries. For example, having "entityFramework" tag there causes this problem for me.

    0 讨论(0)
  • 2020-12-01 04:37

    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.

    0 讨论(0)
  • 2020-12-01 04:38

    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.

    • Http over port 44400
    • Https over port 44300

    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

    0 讨论(0)
  • 2020-12-01 04:38

    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"

    0 讨论(0)
  • 2020-12-01 04:40

    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.

    0 讨论(0)
  • 2020-12-01 04:42
    1. Update dnvm
    2. Change global.json sdk version as the dnvm's default
    3. No need to touch project.json or project.lock.json
    0 讨论(0)
提交回复
热议问题