I am trying to access my live Azure Redis Cache Instance inside Visual Studio for locally debugging, I am using StackExchange.Redis
but I am getting this error whenever i try to access my cache value
StackExchange.Redis.RedisConnectionException: No connection is available to service this operation: GET 100014; UnableToConnect on
cache.redis.cache.windows.net:6380/Interactive, Initializing/NotStarted
I have enabled Non SSL on my Redis cache on port 6379 as well, I have tried running my WebApi Locally with SSL as well (Enabled in Visual Studio). The weird part is I am able to connect to same Redis instance using Console application but not with my .Net Core Web APi Project.
private static Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
{
string cacheConnection = "key";
return ConnectionMultiplexer.Connect(cacheConnection);
});
public static ConnectionMultiplexer Connection
{
get
{
return lazyConnection.Value;
}
}
More weird part is I am able to connect to same Redis instance using Redis Cli.