Language
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Starting with .NET Framework 4.6, the System.Net.ServicePointManager and System.Net.Security.SslStream classes no longer support the SSL 3.0 protocol or the RC4 cipher.
Impact
This change affects:
Any app that uses SSL to talk to an HTTPS server or a socket server using any of the following types: HttpClient, HttpWebRequest, FtpWebRequest, SmtpClient, and SslStream.
Any server-side app that cannot be upgraded to support modern TLS configurations.
Mitigation
The recommended mitigation is to upgrade the server-side app to support modern TLS configurations. If that isn't feasible, or if client apps are broken, the AppContext class can be used to opt out of this feature in either of two ways as a temporary compatibility workaround:
Programmatically, by using a code snippet like the following:
const string DisableCachingName = @"TestSwitch.LocalAppContext.DisableCaching"; const string DontEnableSchUseStrongCryptoName = @"Switch.System.Net.DontEnableSchUseStrongCrypto"; AppContext.SetSwitch(DisableCachingName, true); AppContext.SetSwitch(DontEnableSchUseStrongCryptoName, true);Const DisableCachingName As String = "TestSwitch.LocalAppContext.DisableCaching" Const DontEnableSchUseStrongCryptoName As String = "Switch.System.Net.DontEnableSchUseStrongCrypto" AppContext.SetSwitch(DisableCachingName, True) AppContext.SetSwitch(DontEnableSchUseStrongCryptoName, True)Because the ServicePointManager object is initialized only once, defining these compatibility settings must be the first thing the application does.
By adding the following line to the <runtime> section of your app.config file:
<AppContextSwitchOverrides value="Switch.System.Net.DontEnableSchUseStrongCrypto=true"/>
Note, however, that opting out of the default behavior is not recommended, since it makes the application less secure.