运行以下查询时,我无法使用sasl协议机制scram-sha-1错误进行身份验证。有人可以帮我吗?
List<string> dbNames = new List<string>();
string connectionString = "mongodb://username:password@host:port/?authSource=admin";
MongoClient dbClient = new MongoClient(new MongoUrl(connectionString));
var dbList = dbClient.ListDatabases().ToList();
foreach (var db in dbList)
{
dbNames.Add(db["name"].ToString());
}