Trying to configure C# client.
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
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
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.
Good to know that it worked out for you. Please let us know if you have more questions.
Thanks
Bhawana
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!