From ba4b84d7f454119ac90d191c2389c5ba8d0438fe Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Mon, 21 Jan 2019 11:09:13 +0100 Subject: [PATCH] Fixes #4166 - Outgoing connections sometimes fail because they require TLS 1.2 --- src/Umbraco.Web/WebBootManager.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Umbraco.Web/WebBootManager.cs b/src/Umbraco.Web/WebBootManager.cs index 7863033c4b..dbab3d2346 100644 --- a/src/Umbraco.Web/WebBootManager.cs +++ b/src/Umbraco.Web/WebBootManager.cs @@ -4,6 +4,7 @@ using System.Collections.Specialized; using System.Configuration; using System.IO; using System.Linq; +using System.Net; using System.Web; using System.Web.Configuration; using System.Web.Http; @@ -130,6 +131,10 @@ namespace Umbraco.Web InstallHelper insHelper = new InstallHelper(UmbracoContext.Current); insHelper.DeleteLegacyInstaller(); + // Tell .net 4.5 that we also want to try connecting over TLS 1.2, not just 1.1 + if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false) + ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls12; + return this; }