0

我编写了一个 ASP.NET MVC 应用程序,它主要使用 couchbase 1.8。当我在我的开发环境中运行该应用程序时它可以工作,但是当我将它部署到我的测试环境中时,我收到以下错误。

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.IMemcachedKeyTransforme
.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)...

我的配置如下所示:

<couchbase>
  <servers bucket="default" bucketPassword="">
    <add uri="http://xxxxx:8091/pools"/>
  </servers>
</couchbase>

调用代码是:

using (var client = new CouchbaseClient())            
{
  var session = client.Get<string>(idString);
  return session;
}

using (var client = new CouchbaseClient())
{
    client.Store(StoreMode.Set, idString,
    "Logged Out",
    expires);                
}

有没有人有任何线索是什么问题?

4

0 回答 0