I am working on getting our system updated from Couchbase Server 4.6 to Couchbase Server 5.0.
We’re using Sync Gateway 2.5 and CouchbaseNetClient 2.7.27
I’m struggling to our website authenticated and connected to the bucket. The Sync Gateway authentication works correctly, and our mobile app is working with it.
However, our C# backend keeps having authentication issues:
Could not bootstrap with CCCP. (Authentication failed for bucket 'dev') ---> System.Security.Authentication.AuthenticationException: Authentication failed for bucket 'dev'
This is the same code that worked for 4.6, so I’m assuming that 5.0 requires different authentication to work.
I have spent the last 2 - 3 days trying to figure out how this is done. The documentation here:
Says to use this:
var cluster = new Cluster(new ClientConfiguration
{
Servers = new List<Uri> { new Uri("http://10.112.170.101") }
});
var authenticator = new PasswordAuthenticator("username", "password");
cluster.Authenticate(authenticator);
var bucket = cluster.OpenBucket("bucketname");
However, I keep getting the following errors:
The type or namespace name 'Cluster' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'PasswordAuthenticator' could not be found (are you missing a using directive or an assembly reference?)
I’m not sure what more to do. Every example I find for 2.x says to use this code, but I can’t find anything online about people having issues with it not working. If there is a using
statement I’m missing, I can’t find documentation on which Namespace these exist in.
Any help getting this working would be highly appreciated.
Thanks