0

The method always returns false, and I do not know where the problem is:

  var myObj = new MyObj("Key01","My Value ");
  bool isInserted = memCache.Store(Enyim.Caching.Memcached.StoreMode.Add, myObj.Id, myObj.name , new     TimeSpan(0, 10, 0)); 

My File app.config: (pointing to Amazon ElastiCache)

<configuration>
  <configSections>
    <sectionGroup name="enyim.com">
      <section name="memcached" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />
    </sectionGroup>

  </configSections>
      <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
      </startup>
    <enyim.com>
  <memcached>
    <servers>
      <!-- put your own server(s) here-->
      <add address="memCashed.*****.0015.usw2.cache.amazonaws.com" port="11211" />
    </servers>
    <socketPool minPoolSize="100" maxPoolSize="1000" connectionTimeout="00:10:10" deadTimeout="00:02:00" />
  </memcached>
  </enyim.com>

</configuration>
zavg
  • 10,351
  • 4
  • 44
  • 67
Anziz
  • 1
  • 4
  • Welcome to Stack Overflow. Without giving us more information, any answers are likely to be speculation. Some helpful things to include: Does this configuration work when tested against your local memcached service? What does your cache security group look like? Have you connected it to your EC2 instance's security group? – Anthony Neace Sep 22 '14 at 13:53
  • thank you for your retoure, I did not quite understand the relationship between memcached services, EC2 and ElastiCache I created Cache Clusters in https://console.aws.amazon.com/elasticache/home?region=us-west-2 – Anziz Sep 22 '14 at 14:25
  • for Security Group(s) i choose Default – Anziz Sep 22 '14 at 14:33

1 Answers1

0

By choosing the default security group, you will have prevented network access to your cache clusters unless you have already added an EC2 security group to your default cache security group.

The managing security groups documentation has detailed steps for Authorizing Network Access to an Amazon EC2 Security Group via the AWS console, API, or CLI. You will want to add the same EC2 security group that the instance running your application uses.

From the AWS Console:

  1. Launch the AWS Management Console.

    a. Go to the AWS Management Console web page.

    b. Select ElastiCache from the drop-down list under the Sign in to the AWS Console button, and then click the Sign in to the AWS Console button.

  2. Select Cache Security Groups from the navigation list on the left side of the console window.

  3. In the Cache Security Groups list, select the check box next to the cache security group that you want to grant access to.

  4. At the bottom of the window, in the EC2 Security Group Name list, select your Amazon EC2 security group.

  5. Click the Add button.

    Note: It takes approximately one minute for changes to access permissions to take effect.

Anthony Neace
  • 25,013
  • 7
  • 114
  • 129
  • thank you i created the Security Group(s) "xxxxxxxxxxxx" (VPC)(active). after i Create Cache Clusters with this group. i user client Enyim.Caching. but the set/add methode return false. – Anziz Sep 22 '14 at 22:13