ERR_CONNECTION_REFUSED - .Net 核心 1.0.1 [英] ERR_CONNECTION_REFUSED - .Net Core 1.0.1
问题描述
更新:即使是新的 .net 核心 Web 应用程序也显示相同的错误.
Update: Even a new .net core web application is showing the same error.
我使用的是 .Net Core 版本 1.0.0-preview2-003131.
I'm using .Net Core Version 1.0.0-preview2-003131.
我将 .Net Core SDK 从版本 1.0.0-preview2-003121 升级到上述版本.现在,当我尝试运行该应用程序时,出现错误:ERR_CONNECTION_REFUSED
I upgraded a .Net Core SDK from Version 1.0.0-preview2-003121 to the above mentioned. Now when I try to run the application I get the error: ERR_CONNECTION_REFUSED
当我在 Internet 上搜索时,大部分内容都是更改端口号.我改了,还是不行.
When I searched on Internet most of the stuff is to change the Port number. I change that and it still doesn't work.
任何想法如何解决这个问题?
Any ideas how to fix this?
project.json 文件是:
The project.json file is:
{
"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%" ]
}
}
编辑
我的调试配置是
解决方案资源管理器窗口是
And the Solution Explorer window is
推荐答案
我发现当我们在 project.json
dependencies 下缺少以下内容时会发生这种情况>
I figured it out that this happens when we are missing the following under the dependencies
in project.json
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
}
注意如果版本错误(在上面提到的),那么我们也会看到同样的错误.
NOTE If the version is wrong (in the above mentioned) then also we see the same error.
这篇关于ERR_CONNECTION_REFUSED - .Net 核心 1.0.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!