Unable to connect to MongoDB (MongoLabs) via C# client

后端 未结 4 765
庸人自扰
庸人自扰 2020-12-20 15:25

Question Background:

I have setup in MongoLabs (mLab - https://mlab.com/) a database and have added a very simple Collection. I am using the MongoDB

4条回答
  •  难免孤独
    2020-12-20 15:34

    Quick workaround : just remove database name from the url

    var client = new MongoClient("mongodb://root:example@localhost:27017");
    
    var _db = client.GetDatabase("testDB");
    

提交回复
热议问题