Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2245

Driver version 2.5.0 is failing to connect to a hidden replica set member.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5.1
    • Component/s: None
    • Labels:
      None

      Description

      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).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rstam Robert Stam
              Reporter:
              wan.bachtiar Wan Bachtiar
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: