Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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" ]
  }
}
like image 422
martonx Avatar asked Dec 10 '15 08:12

martonx


2 Answers

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.

like image 121
Vackup Avatar answered Sep 22 '22 18:09

Vackup


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.

like image 23
RonC Avatar answered Sep 21 '22 18:09

RonC