- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我在使用 .Net SDK
连接 couchbase 集群
(服务器)时出现异常,使用最新的 .net 连接器用于 Couchbase 服务器
。附加 C# 代码和 App.config。
异常:
"An unhandled exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll Additional information: Unrecognized attribute 'OperationLifeSpan'. Note that attribute names are case-sensitive."
如果我在这里遗漏了什么,请帮助我,
C#代码:
public static void CreateOrder()
{
using (var cluster = new Cluster("couchbaseClients/couchbase"))
{
IBucket bucket = null;
try
{
bucket = cluster.OpenBucket();
var order = new Document<Order>()
{
Id = Guid.NewGuid().ToString(),
Content = new Order()
{
Name="Tiffin",
Location="WITP",
Quantity=2
}
};
var result = bucket.Insert(order);
if (result.Success)
Console.WriteLine("Order Created '{0}'", order.Id);
}
finally
{
if (bucket != null)
cluster.CloseBucket(bucket);
}
}
}
配置:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="couchbaseClients">
<section name="couchbase"
type="Couchbase.Configuration.Client.Providers.CouchbaseClientSection, Couchbase.NetClient"/>
</sectionGroup>
</configSections>
<couchbaseClients>
<couchbase useSsl="false" operationLifeSpan="1000">
<servers>
<add uri="http://192.168.56.101:8091/pools"></add>
<add uri="http://192.168.56.102:8091/pools"></add>
<add uri="http://192.168.56.103:8091/pools"></add>
<add uri="http://192.168.56.104:8091/pools"></add>
</servers>
<buckets>
<add name="default" useSsl="false" password="" operationLifespan="2000">
<connectionPool name="custom" maxSize="10" minSize="5" sendTimeout="12000"></connectionPool>
</add>
</buckets>
</couchbase>
</couchbaseClients>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
</startup>
</configuration>
最佳答案
您在 operationLifespan 中使用大写字母 S 而不是小写字母 s。
尝试
<couchbase useSsl="false" operationLifespan="1000">
代替
<couchbase useSsl="false" operationLifeSpan="1000">
关于.net - 使用 .net 连接器连接 Couchbase 服务器时出现异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35967010/
我有看起来像这样的文件: { "name": "n", "age": 22 //other properties "hash": "XyRZHDJJD6738..." //This property
有下一个对象 "a" : { "id" : "1", "arr" : [ {"id" : "b1"}, {"id" : "b2"} ] } "b1" : { "id" : "b
Couchbase 文档说“磁盘持久性使您能够执行备份和恢复操作,并使您能够将数据集增长到比内置缓存层更大的数据集”,但我似乎无法让它发挥作用。 我正在一个三节点集群上测试 Couchbase 2.5
我搜索了有关 Couchbase 如何在集群内实现强一致性的解释。这一切都是因为使用了membase吗? 最佳答案 顺便说一句,Couchbase 是 membase。 Couchbase 是一个产品
我有以下格式存储的 couchbase 文档: { "userEmail": "satyam@xyz.com", "hashedPassword": "$2a$12$MT31FHNEbOAKpQGzL
请在下方找到有关 Couchbase 产品路线图的问题。 上下文 我目前正在研究一项将现有系统(后端应用程序和移动应用程序)转变为 Multi-Tenancy 应用程序的功能。 堆栈将是: 沙发底座
什么是 Couchbase,什么是 Couchbase Lite?两者之间有什么区别吗?如何在移动设备中创建 couchbase lite 以及如何与服务器通信? 最佳答案 你碰巧知道CouchDB
我正在寻找一种使用 Spring Data Couchbase 连接到两个单独的 Couchbase 集群的方法。查看文档和实现,不清楚如何执行此操作,我担心如果有两个扩展 AbstractCouch
我想使用 couchbase lite 和 couchbase syncgetway 在 nodejs 中开发一个 CRUD 应用程序。我想在 Raspberry-pi 上运行这个 Node js 应
我在 couchbase 存储桶中有具有这种结构的文件: "name": { "grandfather": { "parent1": { "ch
我有一个依赖于另一个的文件。第一的: { "doctype": "closed_auctions", "seller": { "person": "person11304" },
我以前使用过 couchdb 并且非常喜欢它的 UI,因为我可以直接在 UI 中创建 View 并测试它们并查看文档。 因为,我需要扩展,所以我开始使用 couchbase。但是,在安装 couchb
我的环境中有一个二级索引(没有复制),我想知道如何在不删除索引的情况下创建复制? 我不想删除索引并用副本重新创建它,因为我没有使用主索引,因此有约束。 谢谢 最佳答案 即将发布的 6.50 版本您可以
我正在考虑将 couchbase 用于我的下一个 Web 应用程序,我想知道我的数据应该如何构建,特别是存储桶的使用。例如,假设每个用户将拥有大量唯一数据,是否应该为每个用户创建一个单独的存储桶(甚至
我正在开发一个小型 express 应用程序,目前允许用户登录(通过护照)并查看有关他们 friend 的信息,即购买历史记录、喜欢等。理想情况下,我希望每个用户都有一个随附的个人资料照片和他们购买的
对于 Cassandra,假设复制因子为 1(即数据集的两个副本),至少需要三个节点才能启用具有强一致性的写入。 Couchbase 似乎没有这个要求,至少我没有在任何地方找到它。尽管如此,Couch
我正在使用 Couchbase 存储桶,其中所有文档都使用 DocType 保存。标识包含什么类型的数据的属性。我想执行一个查询,从每个 DocType 给我一个结果, 用作所有文档类型的示例。 我可
无法更改 Couchbase 控制台的端口号。默认为 8091。我试图在已知的 static_config 文件中附加一行。这条线就像- {rest_port, 9000}. 这是我缺少文件的屏幕。
我想使用 Couchbase,但我想在一些类似于 RethinkDB 的方式实现更改跟踪。 似乎有很多方法可以将更改从 Couchbase 服务器推送给我。 DCP 点击 XDCR 哪一个是正确的选择
我有一个 couchbase 文档,id 为 x x 没有子文档,因为在一些子文档操作中都被删除了,它是这样的 {} 我想删除所有没有子文档的空文档。是否可以在 couchbase 中使用 N1QL
我是一名优秀的程序员,十分优秀!