MongoDB Atlas: Possible connection errors from .NET clients
Incident Report for MongoDB Cloud
Resolved
This incident has been resolved.
Posted May 01, 2021 - 00:46 UTC
Monitoring
A fix has been implemented and we are monitoring the results.
Posted May 01, 2021 - 00:32 UTC
Identified
Due to an issue with an upstream provider, customers with .NET clients that perform OCSP certificate checking may be unable to connect. This issue will particularly affect users with .NET drivers versions between 1.8 and 2.6.1, inclusive. Affected customers will see connection errors with the following text: System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

We suggest either upgrading to .NET driver 2.7 or higher, or add the following change to your application:

For .NET driver versions >=1.8 but < 2.0, the fix looks like this:
var connectionString = "mongodb://localhost"; // replace localhost with atlas cluster connection string
var settings = MongoClientSettings.FromUrl(new MongoUrl(connectionString));
settings.SslSettings = new SslSettings();
settings.SslSettings.CheckCertificateRevocation = false;
settings.SslSettings.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls11 | System.Security.Authentication.SslProtocols.Tls12;
var client = new MongoClient(settings);

For .NET driver versions 2.0 through 2.6.1, the fix looks like this:
var settings = MongoClientSettings.FromConnectionString("mongodb://localhost"); //replace localhost with atlas cluster connection string
settings.SslSettings = new SslSettings();
settings.SslSettings.CheckCertificateRevocation = false;
var client = new MongoClient(settings);
Posted Apr 30, 2021 - 21:34 UTC
This incident affected: MongoDB Cloud.