The code snippet below followed by the error message picture
ClientConfiguration configuration = new ClientConfiguration();
configuration.PoolConfiguration.MaxSize = 10;
configuration.PoolConfiguration.MinSize = 10;
BucketConfiguration bc = new BucketConfiguration();
bc.Password = "pass";
bc.Username = "Administrator";
bc.BucketName = "myBucket";
configuration.UseSsl = false;
var bucket = ClusterHelper.GetBucket("myBucket");
**Message "Cannot get Info if HttpProvider has not been initialized" string**
The error message is interesting given that the only reference to that error is in a deprecated method. One thing I do see is that when you add the BucketConfiguration to the BucketConfigs dictionary is that the key does not match the bucket name; try changing “NewUserLink” to “myBucket”.
I would also point out that you may have authentication configured incorrectly for the bucket. If you’re using Couchbase 5.0 Beta it looks okay, but for 4.6 and earlier each bucket has it’s own password. It’s not using the Administrator password used to access management functions.
Using the debugger, your invoking the Info property which is flagged as obsolete, meaning you shouldn’t use it. The compiler even tells you to use “Use CreateManager(user, password).ClusterInfo() instead” Is there any reason why you are doing this? That property has nothing to do with bucket operations; instead it provides some cluster information.
It’s only visible through your Locals or drilling into a Watch which explicitly executes the code; which is what you are doing in your screenshots. You can also execute it by doing this:
Going deeper into this, if you were to open a Memcached bucket, calling cluster.Info() might succeed because Memcached buckets use HttpStreamingProvider which this method requires to work. Couchbase buckets bootstrap using CarrierPublicationProvider which is not supported by this method. All of this is the reason why this method is deprecated and flagged as obsolete.