An Azure NoSQL database service for app development.
Hello @Olivia Bates
The error message you’re seeing is usually due to an issue with the connection string format. Here are a few things to consider:
SRV Record: The mongodb+srv option fails if there is no available DNS with records that correspond to the hostname identified in the connection string.
If you use the +srv connection string modifier, the tls (or the equivalent ssl) option is set to true for the connection
Special Characters: If your username or password contains special characters such as :, /, ?, #, [, ], or @, they must be converted using percent encoding
For example, if your password is pass@word, it should be encoded as pass%40word in the connection string
MongoDB Version: The connection string that allows for the mongodb+srv protocol was introduced for MongoDB 3.6]
If your MongoDB instance is of this version or higher, then you must update your MongoDB driver to a current version.
ConnectionString Format: Ensure that your connection string is in the correct format. For MongoDB, it should be in the format mongodb://username:password@host:port
If this information provided here helps solve your issue, please tag this as answered, so it helps further community readers, who may have similar questions.