Using what I think is valid initialization code, and from what I see in the connection string parser, this should work:
var config = new ClusterOptions()
{
Password = "letmein"
};
config.WithConnectionString("couchbase://ingenthr@192.168.1.211?MaxHttpConnections=32");
cluster = await Cluster.ConnectAsync(config);
But it fails, and I don't see any unit tests to verify it:
There was an exception: System.AggregateException: One or more errors occurred. (Username and password are required.)
---> Couchbase.InvalidConfigurationException: Username and password are required.
at Couchbase.Cluster..ctor(ClusterOptions clusterOptions) in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Cluster.cs:line 66
at Couchbase.Cluster.ConnectAsync(ClusterOptions options) in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Cluster.cs:line 119
at couchbase_net_testproj.Program.Initialize() in /Users/ingenthr/src/couchbase-net-testproj/Program.cs:line 58
Debugging in saw that username was indeed null, when it is in the connstr.
Using what I think is valid initialization code, and from what I see in the connection string parser, this should work:
var config = new ClusterOptions() { Password = "letmein" }; config.WithConnectionString("couchbase://ingenthr@192.168.1.211?MaxHttpConnections=32"); cluster = await Cluster.ConnectAsync(config);
But it fails, and I don't see any unit tests to verify it:
There was an exception: System.AggregateException: One or more errors occurred. (Username and password are required.) ---> Couchbase.InvalidConfigurationException: Username and password are required. at Couchbase.Cluster..ctor(ClusterOptions clusterOptions) in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Cluster.cs:line 66 at Couchbase.Cluster.ConnectAsync(ClusterOptions options) in /Users/ingenthr/src/couchbase-net-client/src/Couchbase/Cluster.cs:line 119 at couchbase_net_testproj.Program.Initialize() in /Users/ingenthr/src/couchbase-net-testproj/Program.cs:line 58
Debugging in saw that username was indeed null, when it is in the connstr.