How to fix the error 'The client and server cannot communicate, because they do not possess a common algorithm' in Umbraco 7
Even though Umbraco 7 is an end-of-life product, there are still many thousands of sites running on it in production, when we recently deployed an existing Umbraco 7 website out to a new Windows Server 2022 instance, TLS 1.0 and TLS 1.1 are disabled by default on this version of Windows Server.
This caused the site to throw an unable-to-boot exception of 'The client and server cannot communicate, because they do not possess a common algorithm'
To resolve this issue we had to upgrade .NET Framework to 4.8 and force TLS 1.2 with the ApplicationStarting event.
First, to upgrade the .NET Framework you can right-click on the project name in Visual Studio open the Application tab and then change the Target framework to .NET Framework 4.8
Next you need to change the httpruntime targetFramework attribute in the Web.Config
<system.Web> <httpRuntime targetFramework="4.8" /> </system.Web>
To force TLS 1.2 create a file in the App_Start folder called MySiteApplicationEventHandler.cs within this file add the code below:
public class MySiteApplicationEventHandler : ApplicationEventHandler { protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; } }
Once these changes have been made, your Umbraco 7 website should be able to run without TLS 1.0 and TLS 1.1 enabled, which is extremely useful with the upcoming Microsoft Azure TLS depreciation.
If Moriyama's team of expert Umbraco consultants can help your team with this, or any other Umbraco-related requirements, please get in touch with us via the form below: