Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-335

Admin credentials required to create a design document

    Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.8
    • Fix Version/s: backlog-1.0
    • Component/s: library
    • Labels:
      None

      Description

      http://www.couchbase.com/communities/q-and-a/credentials-deploy-view-using-couchbasecluster

      I spent some time with the SDK trying to figure this out and it looks like a bug in the client SDK:

      var config = new CouchbaseClientConfiguration();
      config.Urls.Add(new Uri(ConfigurationManager.AppSettings["CouchbaseServerUrl"] + "/pools"));
      config.Password = "Administrator";
      config.Username = "password";
      config.Bucket = "authenticated";
      config.BucketPassword = "secret";

      var cluster = new CouchbaseCluster(config);

      using (var stream = new FileStream("Data
      CityViews.json", FileMode.Open))

      { var result = cluster.CreateDesignDocument("authenticated", "somename", stream); Assert.IsTrue(result); }

      Even this doesn’t work and returns a 401 Unauthorized…if you remove the cluster level authentication, then 401 unauthorized is still returned. Note that this will create the design document under the default bucket:

      var config = new CouchbaseClientConfiguration();
      config.Urls.Add(new Uri(ConfigurationManager.AppSettings["CouchbaseServerUrl"] + "/pools"));
      config.Bucket = "authenticated";
      config.BucketPassword = "secret";

      var cluster = new CouchbaseCluster(config);

      using (var stream = new FileStream("Data
      CityViews.json", FileMode.Open))

      { var result = cluster.CreateDesignDocument("default", "somename", stream); Assert.IsTrue(result); }
      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            jmorris Jeff Morris
            Reporter:
            jmorris Jeff Morris
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Gerrit Reviews

              There are no open Gerrit changes