I am getting the below error when I try to connect to Azure cosmosdb mongo api from my asp.net core :
Error: TimeoutException: A timeout occured after 30000ms selecting a server using CompositeServerSelector
Code used:
readonly string _cn = @"mongodb://testdb12321:f2iORCXklWzAHJLKbZ6lwesWU32SygfUN2Kud1pu1OtMBoe9lBPqHMWdbc0fF7zgl7FryTSCGv7EGCa6X8gZKw==@testdb12321.documents.azure.com:10255/?ssl=true&replicaSet=globaldb";
var client = new MongoClient(_cn);
var db = client.GetDatabase("researchdb");
var cns = db.ListCollectionNames().First();