Details
-
Bug
-
Resolution: Won't Fix
-
Major
-
2.4.2
-
None
-
Windows / ASP.NET Core
Description
Summary: I'm using "couchbase://localhost" as a connection string and getting an error that only "http" and "https" schemes are allowed.
Repro:
- New ASP.NET Core app
- In Startup.cs, in ConfigureServices, do a ClusterHelper.Initialize
- In the ClientConfiguration::Servers, I create a List<Uri> with one Uri = new("couchbase://localhost")
- In a Controller constructor, I do ClusterHelper.GetBucket("default")
Actual:
Exception -->
{System.ArgumentException: Only 'http' and 'https' schemes are allowed.Parameter name: requestUri at System.Net.Http.HttpRequestMessage.InitializeValues(HttpMethod method, Uri requestUri) at System.Net.Http.HttpRequestMessage..ctor(HttpMethod method, Uri requestUri) at System.Net.Http.HttpClient.GetAsync(Uri requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadString(Uri uri) at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownLoadConfig[T](Uri uri) at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadConfigs(Uri server) at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate) at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.Initialize() at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.StartProvider(String username, String password) at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.GetConfig(String bucketName, String password) at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String password, IClusterCredentials credentials)}
If I switch to http://localhost:8091, it works fine.
Expected:
couchbase://localhost should be a valid connection string.