title: Unable to connect Twemproxy using StackExchange redis in C#
body: <p>I am trying to execute C# code below with StackExchange redis using IP address of the TWEMPROXY server and it gives error below:</p>
  
  <blockquote>
    <p>An unhandled exception of type
    'StackExchange.Redis.RedisConnectionException' occurred in
    StackExchange.Redis.dll</p>
    
    <p>Additional information: It was not possible to connect to the redis
    server(s); to create a disconnected multiplexer, disable
    AbortOnConnectFail. SocketFailure on PING</p>
  </blockquote>
  
  <p>But, when I use local host it works fine and stores data in local Redis cache</p>
  
  <p>The code sample with 'localhost' is as below:</p>
  
  <pre><code>using System;
  namespace WinRedis
  {
      class MainClass
      {
          public static void Main (string[] args)
          {
              new MainClass().testingCache();
              Console.ReadLine();
          }
          public void testingCache()
          {
              SimpleCache&lt;User&gt; cache = new RedisCache&lt;User&gt;("mycache", "localhost:6379");
              cache.Put ("user1", new User () { Name = "test", Email = "test@email.com", Password = "secured" });
              User user = cache.Get("user1");
              Console.WriteLine(user);
          }
      }
      [Serializable]
      class User{
          public string Name { set; get; }
          public string Email { set; get; }
          public string Password {set;get;}
  
          public override string ToString()
          {
              return "User(Name: " + Name + ", Email: " + Email + ", Password: " + Password + ")";
          }
      }
  }
  
  
  using System;
  using StackExchange.Redis;
  
  namespace WinRedis
  {
      public class RedisCache&lt;T&gt; : SimpleCache&lt;T&gt;
      {
          private ConnectionMultiplexer redisConnection = null;
          private IDatabase redis = null;
          private string name = null;
          public RedisCache(string name = "redis-cache",
              string connectionOptions = "localhost:6379")
          {
              this.redisConnection = ConnectionMultiplexer.Connect(connectionOptions); 
              this.redis = redisConnection.GetDatabase ();
              this.name = name;
  
          }
  
          public T Get(string key)
          {
              byte[] result = this.redis.HashGet (name, key);
  
              if (result == null)
                  return default(T);
              else
                  return result.Deserialize&lt;T&gt;();
  
          }
  
          public void Put(string key, T value)
          {
              this.redis.HashSet (name, key, value.SerializeToByteArray() );
          }
  
          public void Close()
          {
              this.redisConnection.Close ();
          }
      }
  }
  </code></pre>
  
  <p>For the same code above, when I replace localhost with TWEMPROXY IP address it gives error. </p>