-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.10.0
-
Component/s: None
-
None
Assuming that `MongoClientSettings.ToString` method does what the below example implies, I would expect it to work. It shows how a valid connection string - after it's been parsed, default values derived from it, and finally reconstructed - no longer works.
[Fact] public void MongoClientSettings_Reconstruction_Localhost() { string connectionString = "mongodb://localhost:27017"; var settings = MongoDB.Driver.MongoClientSettings.FromConnectionString(connectionString); string generatedConnectionString = settings.ToString(); // Fails here with "The connection string is not valid" error // (MongoDB.Driver.MongoConfigurationException) var settings2 = MongoDB.Driver.MongoClientSettings.FromConnectionString(generatedConnectionString); Assert.True(settings.Equals(settings2)); }
- is related to
-
CSHARP-3953 Simplify and consolidate connection string URI parsing logic
- Backlog