An error occurred attempting to determine the process id of the DNX process hosting your application on clean installed windows 10 + vs2015

11,545

Solution 1

The poster has stated that they found the answer to their question but I experienced the same error message with RC1 and the accepted answer did not resolve my issue. I see that Sven Gillis is still hunting for a solution as well so I'd like to share what solved the issue for me.

Turns out that the error can be triggered by a bug in RC1 Update 1 (and all prior versions) which occurs if the installation is being used via a windows login name that has a space in it. e.g. "Tim Smith".

I was not able to find a patch but there is a work around. Just create another user account on the machine that doesn't have a space in it (e.g. "Tim") and to use visual studio under that account. In my case this solved the issue. I can now create web projects in Visual Studio 2015 Community Edition Update 1 via the Asp.Net 5 templates and can run them via F5 and Ctl+F5 from within visual studio and I no longer receive the error.

However if I switch to the original user account on the machine that has a space in it, I still receive the error when trying to run a project generated from the same template. Same code ran from two different windows user accounts producing two very different results. I hope this helps someone else, I wasted 7 full days hunting for the solution to this issue.

Solution 2

I think my problem was because I had the "Enable SSL" option checked but the certificate was not installed on this machine.

So, running the site with Ctl+F5 installed the certificate and then I was able to debug the site solving my issue.

Solution 3

Finally I found the solution. As I told I don't use any authentication in this project, so I switched off "Enable Anonymus Authentication" and "Enable Windows Authentication". But it seems, we mustn't switch off "Enable Anonymus Authentication", because of we will get that "An error occurred attempting to determine the process id of the DNX process hosting your application" error.

So the solution is to keep switched on "Enable Anonymus Authentication" even if you don't use any authentication.

Solution 4

I got this error when I was trying to debug an ASP.NET Core (RC1) project with the Enable SSL option checked. Previously I had moved the IIS Express Development Certificate into the Local Machine\Trusted Root Certificates folder in Certificate Manager in an attempt to prevent Chrome showing SSL errors. It turns out that that certificate is needed in the Local Machine\Personal folder. Copying the certificate there solved the problem.

Share:
11,545
martonx
Author by

martonx

Updated on June 12, 2022

Comments

  • martonx
    martonx almost 2 years

    I have a clean installed windows 10, and a clean installed VS 2015 Update 1 with RC1 ASP.NET Tools. When I start a new ASP.NET MVC project without any authentication!, and Hit F5, I got "An error occurred attempting to determine the process id of the DNX process hosting your application" error.

    I don't have any older version from VS or ASP.NET. Everything is the latest clean install. I went through on this document: http://docs.asp.net/en/latest/getting-started/installing-on-windows.html

    I found this topic, but this is not a duplicated question, because of I didn't upgrade anything, this issue is popping up just on clean installed windows 10 + VS 2015 Update 1 systems. I have a windows 8.1 and VS2013 + VS2015 system, and everything is working fine. I think on windows 10 there must be some plus step on set up the ASP.NET 5 environment.

    Here you are, my project.json file:

    {
      "version": "1.0.0-*",
      "compilationOptions": {
        "emitEntryPoint": true
      },
    
      "dependencies": {
        "Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final",
        "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
        "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
        "Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
        "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
        "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
        "Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
        "Microsoft.Extensions.Configuration.FileProviderExtensions" : "1.0.0-rc1-final",
        "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
        "Microsoft.Extensions.Logging": "1.0.0-rc1-final",
        "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
        "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
        "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final"
      },
    
      "commands": {
        "web": "Microsoft.AspNet.Server.Kestrel"
      },
    
      "frameworks": {
        "dnx451": { },
        "dnxcore50": { }
      },
    
      "exclude": [
        "wwwroot",
        "node_modules"
      ],
      "publishExclude": [
        "**.user",
        "**.vspscc"
      ],
      "scripts": {
        "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
      }
    }
  • martonx
    martonx over 8 years
    Thank you for share this issue with us!
  • David Ward
    David Ward over 8 years
    Thanks, spent ages looking into this and "Enable Anonymous Authentication" fixed it for me
  • A-Sharabiani
    A-Sharabiani about 8 years
    How do you switch on/off Enable Anonymous Authentication?
  • martonx
    martonx about 8 years
    @Ali: right click on project - Properties - and you will find it.