Configure the web server to reject SSL3 and TLS1.0 connections
Attempt to access the source file when debugging in Visual Studio
Platform: Windows 10, Visual Studio 2017
Expected behaviour
The source file should be downloaded and opened by Visual Studio.
Actual behaviour
The file fails to download. When enabling "Print source server diagnostic messages...", the following log is visible (urls removed):
powershell invoke-command -scriptblock {$webClient = New-Object System.Net.WebClient; $webClient.UseDefaultCredentials = $true; $webClient.DownloadFile('[...], '[...]');}
Exception calling "DownloadFile" with "2" argument(s): "The underlying connection was closed: An unexpected error
occurred on a send."
At line:1 char:182
+ ... ls = $true; $webClient.DownloadFile('[...] ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
Comments
This is caused by Visual Studio opening a powershell instance with some strange context when downloading files from source server (probably for legacy reasons). System.Net.ServicePointManager.SecurityProtocol is set to only accept Ssl3 and Tls (meaning Tls 1.0)
Steps to reproduce
Platform: Windows 10, Visual Studio 2017
Expected behaviour
The source file should be downloaded and opened by Visual Studio.
Actual behaviour
The file fails to download. When enabling "Print source server diagnostic messages...", the following log is visible (urls removed):
Comments
This is caused by Visual Studio opening a powershell instance with some strange context when downloading files from source server (probably for legacy reasons).
System.Net.ServicePointManager.SecurityProtocol
is set to only accept Ssl3 and Tls (meaning Tls 1.0)