If the password carries '@' character in the connection string, the connection doesn't happen and throws error.
E.g if the password is 'somepassword1@' in a connection string, it returns only 'somepassword1'. So, this password fails to connect to the database.
FileName : MongoUrlBuilder.cs
Git Path: https://github.com/mongodb/mongo-csharp-driver/blob/master/Driver/Core/MongoUrlBuilder.cs
Line 438-441
const string pattern =
@"^mongodb://" +
@"((?<username>[^:])?<password>[^@])@)?" +
@"(?<servers>" + serverPattern + "(," + serverPattern + ")*)" +
@"(/(?<database>[^?]+)?(?(?<query>.*))?)?$";
Match match = Regex.Match(url, pattern);
Thanks,
Prithiraj