ICouchbaseBucketFactory is obsolete. OK, but how to do it right?



I noticed that ICouchbaseBucketFactory is marked as obsolete in version 2.3.1, with a reference to start using “CouchbaseConfigSection” instead. However, I cannot find any mention of how to do this. I would like to see this in the documentation and preferably also with an example.


I just realized that ICouchbaseBucketFactory is in Couchbase-AspNet, not CouchBaseNetClient. But hopefully this forum works for that too. :slight_smile:

So I’ll rephrase the question with Couchbase-AspNet version 2.0.0-beta4 instead.


@mathiasr -

The “new” configuration directions are part of the github readme: https://github.com/couchbaselabs/couchbase-aspnet/blob/master/README.md

Read through that and let me know if you run into any issues.



Thanks for the quick reply Jeff!

I got it working now by changing the configuration to pretty much exactly as your example. Seems a bit picky about the naming… Previously I read the configured bucket name in my factory, and passed that name into ClusterHelper.GetBucket (basically to avoid having to write the bucket name twice in the config). But it works now when I removed the factory and instead specify the bucket name in the session state provider config. I also had to fix “Important #1” which is rather unintuitive IMHO.

In the readme, you probably want to remove the section below “Important #2” since it is now mandatory to specify the bucket name, not optional. Or maybe it works to omit the bucket name if it is “Default”? Anyway, that section and “Important #2” should be more in sync.



@mathiasr -

Nice to hear its working now - to support multi-cluster configuration we had to change the configuration significantly, and yes the naming is very picky because its now a key for the configuration lookup.

Thanks for the feedback will look into it!