I am trying to connect to a MongoDB with my .NET Core 2 controller and I am getting the following error:
MongoDB.Driver.MongoConfigurationException: The connection string 'mongodb://@myapp-a1yri.mongodb.net' is not valid.
I am trying to initialize a MongoClient using the connection string, but I am not sure how to format the connection string and the MongoDB documentation doesn't have anything examples for .NET in it.
This is my current connection string attempt: var client = new MongoClient("mongodb://@myapp-a1yri.mongodb.net");
I am sure it is just simple syntax.
I appreciate the help
@seems to be the end of theusername:password@parameters which you are missing (if needed). Just copy/paste something from somewhere rarely works exactly as one intends.