尝试确定在干净安装的Windows 10 + vs2015上托管应用程序的DNX进程的进程ID时发生错误

时间:2022-06-03 13:45:13

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.

我有一个干净安装的Windows 10,以及一个干净安装的VS 2015 Update 1与RC1 ASP.NET工具。当我启动一个没有任何身份验证的新的ASP.NET MVC项目!和Hit F5时,我得到“尝试确定托管您的应用程序的DNX进程的进程ID时出错”错误。

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

我没有VS或ASP.NET的任何旧版本。一切都是最新的干净安装。我查看了这个文档: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.

我找到了这个主题,但这不是一个重复的问题,因为我没有升级任何东西,这个问题就出现在干净安装的Windows 10 + VS 2015 Update 1系统上。我有一个Windows 8.1和VS2013 + VS2015系统,一切正常。我认为在Windows 10上设置ASP.NET 5环境必须有一些额外的步骤。

Here you are, my project.json file:

在这里,我的project.json文件:

{
  "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" ]
  }
}

5 个解决方案

#1


4  

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.

海报说他们找到了他们问题的答案,但我遇到了与RC1相同的错误信息,并且接受的答案没有解决我的问题。我看到Sven Gillis还在寻找解决方案,所以我想分享一下为我解决问题的方法。

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".

事实证明,如果通过其中包含空格的Windows登录名使用安装,则可能由RC1 Update 1(以及所有先前版本)中的错误触发该错误。例如“蒂姆史密斯”。

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.

我无法找到补丁,但有一个解决方法。只需在机器上创建另一个没有空格的用户帐户(例如“Tim”),并在该帐户下使用visual studio。就我而言,这解决了这个问题。我现在可以通过Asp.Net 5模板在Visual Studio 2015 Community Edition Update 1中创建Web项目,并可以从Visual Studio中通过F5和Ctl + F5运行它们,我不再收到错误。

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.

但是,如果我切换到其中有空格的计算机上的原始用户帐户,我仍然会在尝试运行从同一模板生成的项目时收到错误。从两个不同的Windows用户帐户运行相同的代码,产生两个非常不同的结果我希望这有助于其他人,我浪费了7天的时间来寻找解决这个问题的方法。

#2


15  

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

我认为我的问题是因为我选中了“启用SSL”选项,但此计算机上未安装证书。

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

因此,使用Ctl + F5运行该站点安装了证书,然后我就能够调试解决我的问题的站点。

#3


2  

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.

最后我找到了解决方案。正如我所说,我在这个项目中没有使用任何身份验证,因此我关闭了“启用Anonymus身份验证”和“启用Windows身份验证”。但似乎,我们不能关闭“启用Anonymus身份验证”,因为我们将得到“尝试确定托管您的应用程序的DNX进程的进程ID时出错”错误。

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

因此,即使您不使用任何身份验证,解决方案仍然是“启用Anonymus身份验证”。

#4


2  

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.

当我尝试使用“启用SSL”选项调试ASP.NET Core(RC1)项目时,出现此错误。以前,我已将IIS Express开发证书移动到证书管理器中的本地计算机\受信任的根证书文件夹中,以防止Chrome显示SSL错误。事实证明,Local Machine \ Personal文件夹中需要该证书。在那里复制证书解决了问题。

#5


0  

For me, on my clean installation, not having the URL Rewrite extension installed was causing this error.

对我来说,在我的干净安装中,没有安装URL Rewrite扩展导致此错误。

http://www.iis.net/downloads/microsoft/url-rewrite

After installation, I no longer get the error.

安装后,我不再收到错误。

The authentication answers above didn't make any difference in my case.

上面的认证答案对我的情况没有任何影响。

#1


4  

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.

海报说他们找到了他们问题的答案,但我遇到了与RC1相同的错误信息,并且接受的答案没有解决我的问题。我看到Sven Gillis还在寻找解决方案,所以我想分享一下为我解决问题的方法。

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".

事实证明,如果通过其中包含空格的Windows登录名使用安装,则可能由RC1 Update 1(以及所有先前版本)中的错误触发该错误。例如“蒂姆史密斯”。

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.

我无法找到补丁,但有一个解决方法。只需在机器上创建另一个没有空格的用户帐户(例如“Tim”),并在该帐户下使用visual studio。就我而言,这解决了这个问题。我现在可以通过Asp.Net 5模板在Visual Studio 2015 Community Edition Update 1中创建Web项目,并可以从Visual Studio中通过F5和Ctl + F5运行它们,我不再收到错误。

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.

但是,如果我切换到其中有空格的计算机上的原始用户帐户,我仍然会在尝试运行从同一模板生成的项目时收到错误。从两个不同的Windows用户帐户运行相同的代码,产生两个非常不同的结果我希望这有助于其他人,我浪费了7天的时间来寻找解决这个问题的方法。

#2


15  

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

我认为我的问题是因为我选中了“启用SSL”选项,但此计算机上未安装证书。

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

因此,使用Ctl + F5运行该站点安装了证书,然后我就能够调试解决我的问题的站点。

#3


2  

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.

最后我找到了解决方案。正如我所说,我在这个项目中没有使用任何身份验证,因此我关闭了“启用Anonymus身份验证”和“启用Windows身份验证”。但似乎,我们不能关闭“启用Anonymus身份验证”,因为我们将得到“尝试确定托管您的应用程序的DNX进程的进程ID时出错”错误。

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

因此,即使您不使用任何身份验证,解决方案仍然是“启用Anonymus身份验证”。

#4


2  

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.

当我尝试使用“启用SSL”选项调试ASP.NET Core(RC1)项目时,出现此错误。以前,我已将IIS Express开发证书移动到证书管理器中的本地计算机\受信任的根证书文件夹中,以防止Chrome显示SSL错误。事实证明,Local Machine \ Personal文件夹中需要该证书。在那里复制证书解决了问题。

#5


0  

For me, on my clean installation, not having the URL Rewrite extension installed was causing this error.

对我来说,在我的干净安装中,没有安装URL Rewrite扩展导致此错误。

http://www.iis.net/downloads/microsoft/url-rewrite

After installation, I no longer get the error.

安装后,我不再收到错误。

The authentication answers above didn't make any difference in my case.

上面的认证答案对我的情况没有任何影响。