You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The ServicePointManager security protocol does not work on Windows 7 #13787
> If your app targets .NET Framework 4.7 or later versions
> The following sections show how to verify you're not using a specific TLS or SSL version.
> For HTTP networking
> ServicePointManager, using .NET Framework 4.7 and later versions, defaults to the OS choosing the best security protocol and version. To get the default OS best choice, if possible, don't set a value for the SecurityProtocol property. Otherwise, set it to SystemDefault.
This recommendation does not work on Windows 7 Service Pack 1 with .NET Framework 4.7.2 and application targeting 4.7.2
In this configuration, the HttpClient will not connect to the TLS 1.2 server.
Downloading data with HttpClient.GetStringAsync("https://docs.microsoft.com/") on Windows 7 will fail:
Environment.Version: 4.0.30319.42000
ServicePointManager.SecurityProtocol: SystemDefault
Downloading from 'https://docs.microsoft.com/'
HttpRequestException: An error occurred while sending the request.
WebException: The underlying connection was closed: An unexpected error occurred on a send.
IOException: Authentication failed because the remote party has closed the transport stream.
Only solution is to set ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 which defeats the purpose of SystemDefault setting.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 7341fa0a-f474-6c2d-d3c0-7e2df12fbb65
Version Independent ID: e99c489a-7518-d293-ad93-7eaca8b7191a
Is TLS 1.2 enabled by default for your Windows 7 install? I've looked around online and on forums and it doesn't seem to indicate this is the default for the OS.
I just noticed that the article has a link to a specific issue to discuss this. At the end of the issue is a recent comment: #4675 (comment)
This states that even though TLS 1.2 is supported, its not set as the default by the Windows 7 OS (probably so as to not instantly break all existing apps that expect a lower TLS?) and you'll still have to enable it.
Specifically though, there is an engineer or support person on that linked thread, I would post there for help or clarification. They can also update the documentation if something isn't as clear as it should.
With that in mind, I'm going to close this issue. If the linked information doesn't seem to help (or I've just misunderstood the problem, again) please continue on the linked thread. Hope I've helped a bit a least 😄
Activity
Thraka commentedon Aug 9, 2019
Is
TLS 1.2enabled by default for your Windows 7 install? I've looked around online and on forums and it doesn't seem to indicate this is the default for the OS.jozefizso commentedon Aug 9, 2019
This is a fully patched Windows 7 SP1 machine which can correctly load TLS 1.2 sites.
PS: documentation clearly states it will select the most secure protocol version.
Thraka commentedon Aug 9, 2019
I just noticed that the article has a link to a specific issue to discuss this. At the end of the issue is a recent comment: #4675 (comment)
This states that even though TLS 1.2 is supported, its not set as the default by the Windows 7 OS (probably so as to not instantly break all existing apps that expect a lower TLS?) and you'll still have to enable it.
Actually, at the end of the article it lists the problem I think you're running into specifically: https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls#support-for-tls-12
Thraka commentedon Aug 9, 2019
Specifically though, there is an engineer or support person on that linked thread, I would post there for help or clarification. They can also update the documentation if something isn't as clear as it should.
With that in mind, I'm going to close this issue. If the linked information doesn't seem to help (or I've just misunderstood the problem, again) please continue on the linked thread. Hope I've helped a bit a least 😄
6 remaining items
jozefizso commentedon Aug 12, 2019
This is a real breaking change which makes applications to silently switch to insecure TLS protocol just by re-targeting to .NET 4.7.1.
jozefizso commentedon Aug 12, 2019
This is false - .NET 4.7.x app will ignore supported TLS protocols and it will connect only using the default protocol.
Fix documentation for TLS in 4.7 Framework (#14239)