Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mursino/abc651f96b87dc7cc4bf3087825bba2c to your computer and use it in GitHub Desktop.
Save mursino/abc651f96b87dc7cc4bf3087825bba2c to your computer and use it in GitHub Desktop.
var cert = new X509Certificate2("client.pfx", "mySuperSecretPassword");
args.MongoSettings.SslSettings = new SslSettings();
args.MongoSettings.SslSettings.ClientCertificates = new[] { cert };
args.MongoSettings.UseSsl = true;
@walleyuan
Copy link

Hi mursion,

Your blog is absolutely useful, I have one quick question. I'm using MongoDB Atlas (Cloud Service), are you using the Cloud version as well, how did you generate the client.pfx?

Cheers,
Zhen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment