Azure – Connect to private vlan ip address redis cache azure

azureazure-networkingredis

I have a redis cache with Microsoft Azure and have a Virtual network with IP 172.160.0.99, when I try to connect using these IP this gave me error.

I need other additional configuration for meet it?

Best Answer

from

https://github.com/a-magdy/azure-content/blob/master/articles/redis-cache/cache-how-to-premium-vnet.md

[AZURE.IMPORTANT] To access your Azure Redis cache instance when using a VNET, pass the static IP address of the cache in the VNET as the first parameter, and pass in an sslhost parameter with the endpoint of your cache. In the following example the static IP address is 172.160.0.99 and the cache endpoint is contoso5.redis.cache.windows.net.

{
 return ConnectionMultiplexer.Connect("172.160.0.99,sslhost=contoso5.redis.cache.windows.net,abortConnect=false,ssl=true,password=password");
      });

public static ConnectionMultiplexer Connection
{
   get
     {
        return lazyConnection.Value;
   }
}