Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-6347

.NET code sample is not compiling, even when "fixed" throws runtime exception

    XMLWordPrintable

Details

    Description

      The code sample for this page (https://docs.couchbase.com/dotnet-sdk/2.7/sdk-xattr-example.html) does not compile (using .NET SDK 2.7.16, and .NET Framework 4.7.2).

      First, `SubdocMutateFlags` doesn't exist. It should (probably) be `SubdocPathFlags` instead.

      Second, the `cluster.CreateManager().UpsertUser` part is missing a parameter value for authentication domain. It should look more like `cluster.CreateManager().UpsertUser(AuthenticationDomain.Local, "jsmith123", ... etc ...);`

      Finally, even when making these changes, the code as is throws an ObjectDisposedException: "The collection has been disposed".

      Could you please update this code snippet so that it compiles and runs as-is?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jmorris Jeff Morris
            docsite-collector Docs Site Collector
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty