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?
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?
Would like to note that the current documentation suggests the opposite of the other answer. The documentation below recommends connecting via hostname instead of IP.
We recommend using the hostname. In other words, use the following:
[mycachename].redis.windows.net:6380,password=xxxxxxxxxxxxxxxxxxxx,ssl=True,abortConnect=False
Avoid using the IP address similar to the following connection string:
10.128.2.84:6380,password=xxxxxxxxxxxxxxxxxxxx,ssl=True,abortConnect=False
from
[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;
}
}