Error when trying to access couchbase from my test environment
Hi
I have written a ASP.NET MVC application that makes primitice use of couchbase 1.8. The application works when I run it in my dev environment but when I deploy it into my test environment then I get the following error.
System.NullReferenceException: Object reference not set to an instance of an object. at Enyim.Caching.Memcached.DefaultKeyTransformer.Transform(String key) at Enyim.Caching.Memcached.KeyTransformerBase.Enyim.Caching.Memcached.IMemcachedKeyTransformer.Transform(String key) at Couchbase.CouchbaseClient.PerformStore(StoreMode mode, String key, Object value, UInt32 expires, UInt64& cas, Int32& statusCode) at Enyim.Caching.MemcachedClient.Store(StoreMode mode, String key, Object value, DateTime expiresAt) at MyApp.AddInActiveSession(String key, DateTime expires)...
Does anyone have any clues what the issue is?
Thanks
Dunc
Copying over the thread from StackOverflow...
http://stackoverflow.com/questions/11361609/couchbase-net-sdk-error-when...
Given that stack trace and the code you posted, it's odd, but it appears that your key is null - DefaultKeyTransformer.Transform is the call that's breaking with a null reference exception. How do you generate idString? Also note that you don't want to use the CouchbaseClient in an instance-per-operation manner because there's an expensive handshake when you new up an instance - instead try a per-app-domain model (i.e., global static instance).