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

Dns resolver only uses first DNS server.

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.10.3
    • Affects Version/s: 2.7.3
    • Component/s: Connectivity
    • Environment:
      all

      when connecting, the c# client uses the System.DnsClient.LookupClient to resolve srv records.

      When you have multiple dns servers configured, it only uses the first.

      This is the default behavior of the LookupClient.

      Correct way to do it would be something like:

      var lookupClient = new LookupClient();
      
      foreach (var dnsserver in lookupClient.NameServers)
      {
          var response = lookupClient.Query("_mongodb._tcp." + host, QueryType.SRV, QueryClass.IN);
          if (!response.HasError)
              break;
      }
      

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            basiep Bas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: