-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
Affects Version/s: 2.5
-
Component/s: None
-
None
MongoDB C# driver version 2.5.0 failed to connect to a hidden replica set member with the following code:
var client = new MongoClient( new MongoClientSettings { ConnectionMode = ConnectionMode.Direct, Server = new MongoServerAddress("x.x.x.x", 27017), }); var database = client.GetDatabase("db"); var collection = database.GetCollection<BsonDocument>("collection"); var document = collection.Find(new BsonDocument()).FirstOrDefault();
The same code works for version 2.4.x (Tested on 2.4.4 and 2.4.2).
- duplicates
-
CSHARP-2226 Unable to send replSetInitiate to uninitiated replica set using direct connection
- Closed