TLS 1.2 Upgrade in Azure Redis Cache Server

Introduction

 
The TLS 1.0 and 1.1. support will be retired soon in the Azure Redis cache server. It is required to do some configuration setting updates in the code as long as the ASP.NET application is using an Azure cache server with a .NET framework lower than 4.6. In this blog, you will learn how to do the configuration setting updates in an ASP.NET Application with .NET Framework 4.2, so that it will support TLS1.2 in the Azure Redis cache server.
 

Upgrade to TLS1.2

 
Step 1
 
Open your ASP.NET Application
 
Step 2
 
Open Manage NuGet package manager -> update RedisSessionStateProvider to 2.2.6 and its dependency Redis.StrongName to 1.2.6.
 
 TLS 1.2 Upgrade In Azure Redis Cache Server
 
TLS 1.2 Upgrade In Azure Redis Cache Server 
 
Step 3
 
Open web.config file and add sslprotocols="tls12" attribute in the the Redis cache server connection string.
  1. <add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="[give your host name]" port="6380" accessKey="[give your key] " sslprotocols="tls12" abortConnect="false" throwOnError="false" retryTimeoutInMilliseconds="5000" connectionTimeoutInMilliseconds="10000" ssl="True"/>   
Step 4
 
Make sure the minimum TLS Version setting is updated to 1.2 in the Azure portal. 
 
 TLS 1.2 Upgrade In Azure Redis Cache Server
 

Summary

 
We have seen how to upgrade the TLS version to 1.2 in Azure Redis Cache server which is used by the ASP.NET Application with .NET Framework lower than 4.6.