I suspect this because you specified the wrong hostnames.
Here is one thing you should know, the list of available mongo instances does not come from your connection string, it comes from the return result of the first available mongo instance. For example, when a driver interacts with an instance of mongo1, it gets a list of available instances, which you can get with the following command:
rs.status()
in my laptop it returns something like this:
{ "set" : "rs0", "date" : ISODate("2014-01-27T06:43:11Z"), "myState" : 1, "members" : [ { "_id" : 0, "name" : "YX-ARCH:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "uptime" : 15894, "optime" : Timestamp(1390804960, 1), "optimeDate" : ISODate("2014-01-27T06:42:40Z"), "self" : true }, { "_id" : 1, "name" : "YX-ARCH:27011", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 31, "optime" : Timestamp(1390804960, 1), "optimeDate" : ISODate("2014-01-27T06:42:40Z"), "lastHeartbeat" : ISODate("2014-01-27T06:43:10Z"), "lastHeartbeatRecv" : ISODate("2014-01-27T06:43:10Z"), "pingMs" : 0, "syncingTo" : "YX-ARCH:27017" } ], "ok" : 1 }
This means that there are two instances of YX-ARCH: 27017 (primary) and YX-ARCH: 27011 (secondary).
Now the point is that these host names must be resolvable on your IIS server, because your driver will use these addresses to connect to mongo instances.
Thus, if the host name is resolved for Internet IP, while your mongo service is only available on the intranet, you can never connect to it. And you will get the error above.
One more thing: it is not recommended to create a new instance of MongoClient each time. From the document, you can know this is a thread-safe class. And MongoClient is added to the driver for managing a set of replicas. Therefore, in my opinion, you should keep it in a single copy of the object. Since every time you create a new instance, it tries to get replica set settings from one instance, which is not very good for efficiency.