[英]Visual Studio cannot connect to Nuget.org on Windows 7
I'm using Windows 7 x64 and recently Visual Studio stopped working with nuget.org.我正在使用 Windows 7 x64,最近 Visual Studio 停止使用 nuget.org。 Now it reports this error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
现在报这个错误:无法从传输连接中读取数据:一个现有的连接被远程主机强行关闭。
I searched, tried everything from this similar topic: nuget.org: Unable to load the service index我搜索,尝试了这个类似主题的所有内容:nuget.org:无法加载服务索引
I read this article about Deprecating TLS 1.0 and 1.1 on NuGet.org: https://devblogs.microsoft.com/nuget/deprecating-tls-1-0-and-1-1-on-nuget-org/#ensuring-your-system-uses-tls-1-2我在 NuGet.org 上阅读了有关弃用 TLS 1.0 和 1.1 的文章: https://devblogs.microsoft.com/nuget/deprecating-tls-1-0-and-1-1-on-nuget-org/#ensuring-你的系统使用-tls-1-2
I ensured my system has kb2533552 и kb3140245 installed and also checked the necessary values exist in the registry "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client"我确保我的系统安装了 kb2533552 和 kb3140245 并检查了注册表“HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client”中存在的必要值
Still, after all this I am unable to use the Package Manager.尽管如此,毕竟我无法使用 Package 管理器。 I can access https://apiint.nugettest.org/v3-index/index.json from the browser, but I cannot make the following c# code work - it still throws an exception:
我可以从浏览器访问https://apiint.nugettest.org/v3-index/index.json ,但我无法使以下 c# 代码工作 - 它仍然抛出异常
var client = new HttpClient();
string uri = "https://apiint.nugettest.org/v3-index/index.json";
var response = await client.GetAsync(uri);
string msg = "If you see this, your machine has no TLS/SSL issues with nuget.org";
Console.WriteLine(msg);
I had the same problem.我有同样的问题。 I was also unable to check for updates in the extensions and updates dialog.
我也无法在扩展和更新对话框中检查更新。
It started working again when I added the following cipher suites to the machine and rebooted:当我将以下密码套件添加到机器并重新启动时,它再次开始工作:
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384 TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.