Skip to content

fix(cluster): Couchbase Capella TLS connection fails on .NET Framework 4.8 #322

@CalvinAllen

Description

@CalvinAllen

Description

Couchbase Capella connections fail with TLS errors when running on .NET Framework 4.8 (required for VS extensions). The same connection code works correctly on .NET 8.0.

Error Details

When connecting to Capella, the following errors occur:

  1. UnambiguousTimeoutException: A Task was canceled
  2. AuthenticationException: The remote certificate is invalid according to the validation procedure

Environment

  • .NET Framework 4.8 (VS extension requirement)
  • CouchbaseNetClient 3.8.1
  • Couchbase Capella (cloud.couchbase.com)

What Works

  • Local Couchbase Server connections (non-TLS)
  • Capella connections on .NET 8.0 console apps
  • DNS-SRV resolution works correctly

What Was Tried

  • Explicit TLS 1.2/1.3 via ServicePointManager.SecurityProtocol
  • Certificate validation bypass via ServicePointManager.ServerCertificateValidationCallback
  • SDK options: KvIgnoreRemoteCertificateNameMismatch, HttpIgnoreRemoteCertificateMismatch
  • SDK options: EnableDnsSrvResolution, ForceIPv4
  • Extended timeouts on all operations
  • X509 certificate store configuration

None of these resolved the issue.

Potential Solutions

  1. Wait for VS extension support for .NET 8+ (VS 2022+ may eventually support this)
  2. Investigate if a specific Couchbase SDK version has better .NET Framework 4.8 support
  3. File a bug with Couchbase about .NET Framework + Capella TLS compatibility
  4. Consider alternative architecture (e.g., out-of-process .NET 8 service)

Workaround

Users can connect to local Couchbase Server instances. Capella connections are not currently supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:mustEssential for MVP - extension is not viable without this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions