I'm using StackExchange.Redis.StrongName 1.0.394
And I'm trying to connect to my Azure Redis, but I keep getting this error when I run my project:
RedisConnectionException: It was not possible to connect to the redis server(s);
to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING
Oddly enough, if I use StackExchange.Redis 1.0.394
everything works fine, but I need StrongName version in order to use RedisSessionStateProvider.
Here is code for connecting to Redis:
private static ConnectionMultiplexer Connection
{
get
{
if (_connection == null || !_connection.IsConnected)
{
var config = new ConfigurationOptions();
config.EndPoints.Add("myredisname.redis.cache.windows.net");
config.Password = "myverylongkey";
//in ms
config.SyncTimeout = 5000;
config.Ssl = true;
config.AbortOnConnectFail = false;
_connection = ConnectionMultiplexer.Connect(config);
}
return _connection;
}
}