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:
UnambiguousTimeoutException: A Task was canceled
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
None of these resolved the issue.
Potential Solutions
- Wait for VS extension support for .NET 8+ (VS 2022+ may eventually support this)
- Investigate if a specific Couchbase SDK version has better .NET Framework 4.8 support
- File a bug with Couchbase about .NET Framework + Capella TLS compatibility
- 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.
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:
UnambiguousTimeoutException: A Task was canceledAuthenticationException: The remote certificate is invalid according to the validation procedureEnvironment
What Works
What Was Tried
ServicePointManager.SecurityProtocolServicePointManager.ServerCertificateValidationCallbackKvIgnoreRemoteCertificateNameMismatch,HttpIgnoreRemoteCertificateMismatchEnableDnsSrvResolution,ForceIPv4None of these resolved the issue.
Potential Solutions
Workaround
Users can connect to local Couchbase Server instances. Capella connections are not currently supported.