Azure C# functions unable connect to Mongo Db Atlas M0 cluster with standard connection string

I try to connect from C# function in POD, deployed on Azure, to Mongo DB Atlas free tier M0 cluster and receive Timeout exception as:

System.TimeoutException: A timeout occurred after 30000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient+AreSessionsSupportedServerSelector, LatencyLimitingServerSelector{ AllowedLatencyRange = 00:00:00.0150000 } }. Client view of cluster state is { ClusterId : “1”, ConnectionMode : “ReplicaSet”, Type : “ReplicaSet”, State : “Disconnected”, Servers : }.

I am using the latest Mongo DB Driver 2.12.2 and here is the format of connection strings:




Network access in Atlas set to all (IP Access List Entry:

From local workstation the connection is success from any application (POD, UniTest, Compass).

From Mongo DB shell on Azure POD the connection is success too.

From POD in Azure connection success when I use connection string:



  • Why application with Mongo DB Driver 2.12.2 could not connect to Atlas from Azure with connection string dedicated to driver version 2.11 and later and should use connection string dedicated to version 2.4?

  • How can I config my application to use the standard connection string on Azure?