I've successfully installed Membase Server, their "Sub-millisecond access latency" feature is actually forced me to write this question, otherwise I would ten times already switched to MongoDB. So the question: I have properly installed and configured my Membase Server now I want my .NET client application to get access to this database, for this purpose I'm using their Enyim .NET Client. I have written the following test application:
using System;
using System.Linq;
using System.Diagnostics;
using Membase;
using Membase.Configuration;
namespace CouchDB
{
class MainClass
{
public static void Main(string[] args)
{
var config = new MembaseClientConfiguration()
{
Bucket = "helloworld",
BucketPassword = "123",
NodeLocator = typeof(Enyim.Caching.Memcached.DefaultNodeLocator),
Transcoder = new Enyim.Caching.Memcached.DefaultTranscoder(),
KeyTransformer = new Enyim.Caching.Memcached.TigerHashKeyTransformer(),
PerformanceMonitorFactory = null // I'm on Mac OS X
};
config.SocketPool.MinPoolSize = 10;
config.SocketPool.MaxPoolSize = 20;
config.SocketPool.DeadTimeout = TimeSpan.FromSeconds(10);
config.SocketPool.ConnectionTimeout = TimeSpan.FromSeconds(5);
config.Urls.Add(new Uri("http://localhost:8091/pools/default"));
var client = new MembaseClient(config);
var spoon = client.Get<String>("Spoon");
Console.WriteLine(spoon);
}
}
}
The problem occurs when I'm trying to create a client, exception occurs which doesn't even show complete stack, tells only
"Cannot cast from source type to destination type"
at System.Web.Script.Serialization.JavaScriptSerializer..ctor(resolver=null, registerConverters=false)