Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8624215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:28:10+00:00 2026-06-12T07:28:10+00:00

I realize that Couchbase provides a client to their memcached server, but I’m trying

  • 0

I realize that Couchbase provides a client to their memcached server, but I’m trying to get the enyim.caching client to work.

Here’s my trivial c# code that uses the Couchbase client (which works) and then pretty much the same thing with the enyim MemcachedClient:

class Program
{
    static void Main(string[] args)
    {
        var client = new CouchbaseClient();

        client.Store(StoreMode.Set, "somekey", "somevalue");

        var somevalue = client.Get<string>("somekey");

        Console.WriteLine(somevalue);
        Console.ReadLine();

        var mclient = new MemcachedClient();
        mclient.Store(StoreMode.Set, "Hello", "World");
        var myVal = mclient.Get<string>("Hello");
        Console.WriteLine(myVal);
        Console.ReadLine();
    }
}

Here’s my app.config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
      <section name="couchbase" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase"/>
      <sectionGroup name="enyim.com">
        <section name="memcached" type="Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching" />      
      </sectionGroup>
    </configSections>
    <couchbase>
      <servers bucket="default" bucketPassword="myPassword">
        <add uri="http://127.0.0.1:8091/pools"/>
      </servers>
    </couchbase>
<enyim.com>
  <memcached>
    <servers>
      <add address="127.0.0.1" port="8091" />
    </servers>
    <socketPool minPoolSize="10" maxPoolSize="100" connectionTimeout="00:10:00" deadTimeout="00:02:00" />
    <authentication type="Enyim.Caching.Memcached.PlainTextAuthenticator, Enyim.Caching" zone="" userName="Administrator" password="myPassword" />
  </memcached>
</enyim.com>
<startup>
  <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>  
</configuration>

When I step through the code, the Couchbase client appears to work fine. The Get method returns “somevalue” as expected. The code also happily steps through the MemcachedClient code, but when I step through the Store method, it hangs for 10 seconds (I think that’s the timeout) and then the myVal value returns as null. No errors are thrown.

I suspect the problem revolves around the zone value in the authentication node for memcached in the config. In the DemoApp code that is in the enyim.caching source code (retrieved from Github), zone is never specified, but enyim throws an error if the zone isn’t provided – i.e. the DemoApp doesn’t work as is because zone isn’t provided.

I’m not sure this is the problem, but I do know that I can’t leave zone out, but I don’t know what to use for that value. I’ve seen an example where ‘AUTHZ’ was used, but that doesn’t seem to make any difference.

Does anyone see what I’m doing wrong here? Any help is appreciated! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:28:11+00:00Added an answer on June 12, 2026 at 7:28 am

    Ok – I figured out what was going on. I went back into the Couchbase Console and noticed that my only databucket was of type Couchbase. So, I created a new databucket of type Memcached. I noticed that this bucket type required no authentication. I did have to give it a new port.

    Once I made the minimal changes to my config file, the enyim.caching MemcachedClient code worked perfectly!

    Here’s what my new enyim.caching config stuff looks like now:

    <enyim.com>
      <memcached>
        <servers>
          <add address="127.0.0.1" port="8095" />
        </servers>
        <socketPool minPoolSize="10" maxPoolSize="100" connectionTimeout="00:10:00" deadTimeout="00:02:00" />
      </memcached>
    </enyim.com>
    

    I will mark this answer as the solution as soon as I’m able. Hopefully this may help someone from making my knuckleheaded mistake. 🙂

    UPDATE:

    Take a look in the comments for another solution provided by John Zablocki. Thanks John!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I realize that what I am trying to do isn't safe. But I am
I realize that GWt doesn't compile the classes not in the Client package. But
I realize that both will work, but is one more correct than the other?
I realize that a SO user has formerly asked this question but it was
I realize that this question has been asked 100times but none that I have
I realize that there are many questions similar to this one, but having looked
I realize that TeamCity must be a bridge between YouTrack and SVN, but I
I realize that each browser would implement it differently, but are there any references
I realize that they are different beast used to solve different problems, but I
I realize that the phrase good practices is a bit dubious and overused, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.