c# - ERR_CONNECTION_REFUSED - .Net Core 1.0.1

标签 c# .net asp.net-core .net-core

更新:即使是新的 .net 核心网络应用程序也显示相同的错误。

我正在使用 .Net Core 版本 1.0.0-preview2-003131。

我将 .Net Core SDK 从版本 1.0.0-preview2-003121 升级到上述版本。现在,当我尝试运行该应用程序时,出现错误:ERR_CONNECTION_REFUSED

enter image description here

当我在互联网上搜索时,大部分内容都是更改端口号。我更改了它,但它仍然不起作用。

有什么办法解决这个问题吗?

project.json 文件是:

   {
  "userSecretsId": "aspnet-Angle_MVC6_jQuery-f82e2f9a-a8b7-4a73-83f2-8e1da291a076",
  "dependencies": {
    "Microsoft.AspNetCore.Razor.Tools": {
      "version": "1.0.0-preview2-final",
      "type": "build"
    },
    "Microsoft.AspNetCore.Diagnostics": "1.1.1",
    "Microsoft.AspNetCore.Mvc": "1.1.2",
    "Microsoft.AspNetCore.Routing": "1.1.1",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.1",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.1",
    "Microsoft.AspNetCore.StaticFiles": "1.1.1",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.1",
    "Microsoft.Extensions.Configuration.Json": "1.1.1",
    "Microsoft.Extensions.Logging": "1.1.1",
    "Microsoft.Extensions.Logging.Console": "1.1.1",
    "Microsoft.Extensions.Logging.Debug": "1.1.1",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.1",
    "Microsoft.NETCore.App": {
      "version": "1.1.1",
      "type": "platform"
    },
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0"
  },

  "tools": {
    "BundlerMinifier.Core": "2.4.337",
    "Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
  },

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

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

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

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

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

编辑

我的调试配置如下 enter image description here

解决方案资源管理器窗口是 enter image description here

最佳答案

当我将我的应用程序更新到 Microsoft.NETCore.App: 1.1.1 时,我个人偶然发现了类似的问题

在我的例子中,它在运行时抛出一堆警告,警告“命名空间‘http//schemas.microsoft.com/developer/msbuild/2003’中的元素‘xxx’具有无效的子元素...

暂时回滚到 Microsoft.NETCore.App:1.1.0 即可。

Some Info that I found related to the issue

关于c# - ERR_CONNECTION_REFUSED - .Net Core 1.0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42684336/

相关文章:

c# - 压缩包 : Entry name problems

c# - Web API 的 Lambda 表达式

entity-framework - 循环/反射(reflect)所有 EF 模型中的所有属性以设置列类型

c# - .NET Core 2.1 中 UserManager 的 AutoSaveChanges

.net - 团队系统是一个解决方案吗?

asp.net-core - 如何在 .Net Core 3.1 中的 OpenId 连接时禁用 ssl 证书验证?

asp.net-core - Autofac 依赖解析异常

c# - 枚举多次的 .Net 方法应该接受哪种类型的集合作为参数?

c# - Rhino 模拟 AAA 快速入门?

c# - List<T> 和 ArrayList 默认容量