将ASP.NET Core 1.0更新为1.1后出现HTTP 502.5错误

时间:2016-11-18 21:21:52

标签: c# visual-studio-2015 asp.net-core-1.0

重现的步骤

我使用这篇official ASP.NETthis文章将我的ASP.NET Core 1.0应用升级到1.1。该应用程序编译正常,但当我使用F5运行应用程序时,我收到以下错误

错误

HTTP Error 502.5 - Process Failure

Common causes of this issue:

The application process failed to start
The application process started but then stopped
The application process started but failed to listen on the configured port

进一步的技术细节

操作系统:Windows 10

Visual Studio版本:2015-Update 3(包含最新更新)

注意

我的应用程序是在默认内置IIS Express上运行的开发机器(Windows 10)上。不涉及服务器或迁移到其他服务器。

Windows事件日志

Failed to start process with commandline '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\ProjectSystem\VSIISExeLauncher.exe" -p "C:\Program Files\dotnet\dotnet.exe" -a "C:\DotNet2015\src\ABCTest\bin\Debug\netcoreapp1.1\ABCTest.dll" -wd "C:\DotNet2015\src\ABCTest" -wbe Global\Build30603dd4-5933-4547-8aff-af488d42458c -lse Global\Launchf9d250ad-37e9-4e5b-8375-46f63c747deb', ErrorCode = '0x80004005'.

project.json文件

{
  "userSecretsId": "aspnet-ABCTest-6af8ade3-87ff-4468-a9ce-8bb69c696ab8",

  "dependencies": {
    "Microsoft.NETCore.App": {
      "version": "1.1.0",
      "type": "platform"
    },
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0",
    "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final",
    "Microsoft.AspNetCore.Mvc": "1.1.0",
    "Microsoft.AspNetCore.Mvc.Core": "1.1.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
    "Microsoft.EntityFrameworkCore.SqlServer.Design": "1.1.0",
    "Microsoft.AspNetCore.Authentication.Cookies": "1.1.0",
    "Microsoft.AspNetCore.Diagnostics": "1.1.0",
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.1.0",
    "Microsoft.AspNetCore.Identity": "1.1.0",
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0",
    "Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final",
    "Microsoft.AspNetCore.StaticFiles": "1.1.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
    "Microsoft.Extensions.Configuration.Json": "1.1.0",
    "Microsoft.Extensions.Configuration.UserSecrets": "1.1.0",
    "Microsoft.Extensions.Logging": "1.1.0",
    "Microsoft.Extensions.Logging.Console": "1.1.0",
    "Microsoft.Extensions.Logging.Debug": "1.1.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0",
    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": "1.1.0-preview4-final",
    "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "1.1.0-preview4-final"  },

  "tools": {
    "BundlerMinifier.Core": "2.0.238"  },

  "frameworks": {
    "netcoreapp1.1": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "Views",
      "Areas/**/Views",
      "appsettings.json",
      "web.config"
    ]
  },

  "scripts": {
    "prepublish": [ "bower install", "dotnet bundle" ],
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
}

3 个答案:

答案 0 :(得分:8)

您需要安装https://www.microsoft.com/net/download/core

import scala.collection.mutable object CoOccurrence { val text = Seq("love, new, truck, present", "environment, save, trying, stop, destroying", "great, environment, save, money, animals, zoo, daughter, fun", "impressive, loved, speech, inspiration", "Happy Birthday, brother, years, old", "save, money, stop, spending", "new, haircut, love, check it out") def main(args: Array[String]) { val cooc = mutable.Map.empty[(String, String), Int] text.foreach { line => val words = line.split(",").map(_.trim).sorted val n = words.length for { i <- 0 until n-1 j <- (i + 1) until n } { val currentCount = cooc.getOrElseUpdate((words(i), words(j)), 0) cooc((words(i), words(j))) = currentCount + 1 } } println(cooc) } } 版本

答案 1 :(得分:0)

你安装了1.1运行时吗?当您更新参考文献时,它不会自动安装它。

答案 2 :(得分:0)

我发现同样的问题,但我的目标框架工作是 netcoreapp2.0 ,我通过使用自包含部署解决了它,而不是每个Microsoft文档的第三方依赖项。

See here solution