title: Unable to connect to a member of the replica set matching the read preference Primary
body: <p>I have 3 mongodb nodes: primary, secondary and arbiter (version 2.4.9)</p>
  
  <p>I have mongodb C# driver 1.8.3
  I am using the following connection string:</p>
  
  <blockquote>
    <p>connection string "mongodb://mongo2,mongo1,mongo3/?connect=replicaset&amp;replicaset=myrs&amp;readPreference=SecondaryPreferred"</p>
  </blockquote>
  
  <p>When recording half case the driver throws an exception:</p>
  
  <blockquote>
    <p>Unable to connect to a member of the replica set matching the read preference Primary</p>
  </blockquote>
  
  <p>My code:</p>
  
  <pre><code>        var client = new MongoClient(connectionString);
          var server = client.GetServer();
          var database = server.GetDatabase(dbName);
          var collection = database.GetCollection&lt;T&gt;(collectionName);
          collection.Insert(newDoc);
  </code></pre>
  
  <p>What am I doing wrong? </p>