问题描述
更新:即使是新的.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 Core 1.0.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!