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

Specify the correct connection string format for .NET SDK

    XMLWordPrintable

Details

    • DOC-2021-May09-S9, DOC-2021-May23-S10, DOC-2021-Jun06-S11, DOC-2021-Jun20-S12, DOC-2021-Jul04-S13, DOC-2021-Jul18-S14, DOC-2021-Aug01-S15, DOC-2021-Aug15-S16, DOC-2021-Aug29-S17, DOC-2021-Sep12-S18
    • 1

    Description

      In the documention here
      https://docs.couchbase.com/dotnet-sdk/current/howtos/managing-connections.html

      We have the following for specify the connection string with network mode:

      127.0.0.1?io.networkResolution=external&timeout.kvTimeout=10s
      
      

      This is not correct, the correct connection string should be

      ?network=external

      However, for best results, we should use the connection string build like so, per our Jeff Morris

      var cluster = new Cluster(new ClientConfiguration()
      {
      Servers = new List<Uri>
      {
      new Uri("http://10.143.194.101:8888")
      },
      BucketConfigs = new Dictionary<string, BucketConfiguration>
      {
      {"default", new BucketConfiguration
      {
      NetworkType = NetworkTypes.External,
      BucketName = "default",
      Port = 8888,
      }}
      },
      ConfigurationProviders = ServerConfigurationProviders.CarrierPublication
      });
       
      cluster.Authenticate("Administrator", "password");
       
      var bucket = cluster.OpenBucket("default");
      

      Attachments

        Issue Links

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

          Activity

            People

              hakim.cassimally Hakim Cassimally
              tin.tran Tin Tran (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty