尝试确定在全新安装 windows 10 + vs2015 上托管您的应用程序的 DNX 进程的进程 ID 时发生错误

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

我全新安装了 windows 10,并且全新安装了带有 RC1 ASP.NET 工具的 VS 2015 Update 1。当我在没有任何 ! 的情况下开始一个新的 ASP.NET MVC 项目并按 F5 键时,出现 "An error occurred attempting to determine the process id of the DNX process hosting your application" 错误。

我没有来自 VS 或 ASP.NET 的任何旧版本。一切都是最新的全新安装。我浏览了这份文件:http://docs.asp.net/en/latest/getting-started/installing-on-windows.html

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

给你,我的 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" ]
  }
}

我终于找到了解决办法。正如我所说,我在这个项目中不使用任何身份验证,所以我关闭了 "Enable Anonymus Authentication" 和 "Enable Windows Authentication"。 但看起来,我们不能关闭 "Enable Anonymus Authentication",因为我们会得到 "An error occurred attempting to determine the process id of the DNX process hosting your application" 错误。

所以解决方案是保持开启状态"Enable Anonymus Authentication",即使您不使用任何身份验证。

发布者表示他们找到了问题的答案,但我遇到了与 RC1 相同的错误消息,并且接受的答案没有解决我的问题。我看到 Sven Gillis 也在寻找解决方案,所以我想分享为我解决问题的方法。

事实证明,该错误可能是由 RC1 Update 1(以及所有先前版本)中的一个错误触发的,如果通过 windows 具有 [=26= 的登录名使用安装,则会发生该错误] 在里面。例如"Tim Smith"。

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

但是,如果我切换到其中包含 space 的机器上的原始用户帐户,我在尝试 运行 从同一模板生成的项目时仍然会收到错误消息。来自两个不同 windows 用户帐户的相同代码 运行 产生两个截然不同的结果。我希望这对其他人有帮助,我浪费了整整 7 天的时间来寻找这个问题的解决方案。

我认为我的问题是因为我检查了 "Enable SSL" 选项,但是证书没有安装在这台机器上。

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

我在尝试调试选中 Enable SSL 选项的 ASP.NET 核心 (RC1) 项目时遇到此错误。之前,我已将 IIS Express Development Certificate 移动到证书管理器中的 Local Machine\Trusted Root Certificates 文件夹中,以试图防止 Chrome 显示 SSL 错误。事实证明,Local Machine\Personal 文件夹中需要该证书。在那里复制证书解决了问题。

对我来说,在我的全新安装中,没有安装 URL Rewrite 扩展导致了这个错误。

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

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

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