Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Membase Server 1.6.x

Trying to configure C# client.

4 replies [Last post]
  • Login or register to post comments
Fri, 12/10/2010 - 12:06
mhsimkin
Offline
Joined: 12/10/2010
Groups: None

I working on a POC using the Membase community edition.  I download the server and the recommended .Net client this morning.


The server installed fine.  I'm trying to get a client working.  I have placed the following in my app.config file:


   <configSections>
    <section name="membase" type="Membase.Configuration.MembaseClientSection, Membase" />
  </configSections>
  <membase>
    <!-- servers bucket="default" bucketPassword="tvguide" userName="Administrator" password="tvguide" -->
    <servers>
      <add uri="http://172.30.102.152:8091/pools/default" />
      <add uri="http://172.30.102.158:8091/pools/default" />
    </servers>
    <socketPool minPoolSize="10" maxPoolSize="200" connectionTimeout="00:00:10" deadTimeout="00:02:00"/>
    <locator type="Enyim.Caching.Memcached.DefaultNodeLocator, Enyim.Caching" />
    <!--<transcoder type="fully qualified type name" factory="fully qualified type name" />
    <keyTransformer type="fully qualified type name" factory="fully qualified type name" />-->
  </membase>


When I call a either the MembaseClient.TryGet or the MembaseClient.Store command, it always seems to be using the NotFoundLocator.  Which I results in no data being stored or retrieved from the cache.


Any suggestions as to what I'm doing wrong?


Thanks

Top
  • Login or register to post comments
Fri, 12/10/2010 - 12:32
bhawana@membase
Offline
Joined: 10/29/2010
Groups: None

Can you please paste the code snippet here?

Thanks

Bhawana

__________________

Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Membase: http://www.membase.com/products-and-services/overview
Call or email "sales -at- membase -dot- com" today!

Top
  • Login or register to post comments
Fri, 12/10/2010 - 12:40
mhsimkin
Offline
Joined: 12/10/2010
Groups: None

I am creating an instance of the MembaseClient in my CacheManager class as follows:

public class CacheManager
{
   private MembaseClient cacheClient = null;

   private CacheManager()
   {
       cacheClient = new MembaseClient();
   }

    InsertIntoCache(string key, object cacheItem)
    {
      cacheClient.Store(Enyim.Caching.Memcached.StoreMode.Set, key, cacheItem);
    }

}


When I step into the code for the store, I see that the assignment of var node = this.Pool.Locate(hashedKey) is returning null.  Steping into Locate method, I see that it is calling into the private class NotFoundLocator.


I need to understand what is wrong with the configuration, since I defined the located to be of type Enyim.Caching.Memcached.DefaultNodelocator.


Thanks


 

Top
  • Login or register to post comments
Fri, 12/10/2010 - 12:49
mhsimkin
Offline
Joined: 12/10/2010
Groups: None

I have figured out the issue.


The <servers> element in the config file needs to have the username and password provided.  I just read someplace, that since I'm using membase, even in memcache more, it is secured by default.


thanks for the help.

Top
  • Login or register to post comments
Fri, 12/10/2010 - 16:01
bhawana@membase
Offline
Joined: 10/29/2010
Groups: None

Good to know that it worked out for you. Please let us know if you have more questions.

Thanks

Bhawana

__________________

Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Membase: http://www.membase.com/products-and-services/overview
Call or email "sales -at- membase -dot- com" today!

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker