From 4bc9a537abee44d50cd32dc44c6498de221118e6 Mon Sep 17 00:00:00 2001 From: Stephanie Aurelio Date: Mon, 14 Apr 2025 14:28:51 -0700 Subject: [PATCH 1/3] add mongocredential setting --- source/fundamentals/authentication/x509.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/source/fundamentals/authentication/x509.txt b/source/fundamentals/authentication/x509.txt index 4d61fb4e..58142be8 100644 --- a/source/fundamentals/authentication/x509.txt +++ b/source/fundamentals/authentication/x509.txt @@ -119,6 +119,7 @@ see the corresponding syntax: }, UseTls = true, Server = new MongoServerAddress(""[, ""]), + Scheme = ConnectionStringScheme.MongoDBPlusSrv // Needed when connecting to MongoDB Atlas }; Troubleshooting From f8759faf6763140b9b2ab2312d0353e089ba3d53 Mon Sep 17 00:00:00 2001 From: Stephanie Aurelio Date: Mon, 14 Apr 2025 14:40:10 -0700 Subject: [PATCH 2/3] edit --- source/fundamentals/authentication/x509.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/fundamentals/authentication/x509.txt b/source/fundamentals/authentication/x509.txt index 58142be8..35aa67ca 100644 --- a/source/fundamentals/authentication/x509.txt +++ b/source/fundamentals/authentication/x509.txt @@ -119,7 +119,7 @@ see the corresponding syntax: }, UseTls = true, Server = new MongoServerAddress(""[, ""]), - Scheme = ConnectionStringScheme.MongoDBPlusSrv // Needed when connecting to MongoDB Atlas + Scheme = ConnectionStringScheme.MongoDBPlusSrv, // Needed when connecting to MongoDB Atlas }; Troubleshooting From c403b06aef941a7d506677e65976e81ffc45ecda Mon Sep 17 00:00:00 2001 From: Stephanie Aurelio Date: Tue, 15 Apr 2025 08:32:18 -0700 Subject: [PATCH 3/3] mw feedback --- source/fundamentals/authentication/x509.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/fundamentals/authentication/x509.txt b/source/fundamentals/authentication/x509.txt index 35aa67ca..cb600700 100644 --- a/source/fundamentals/authentication/x509.txt +++ b/source/fundamentals/authentication/x509.txt @@ -38,10 +38,12 @@ Code Placeholders The code examples on this page use the following placeholders: -- ``+srv``: Include this option in your connection string prefix only if you are connecting - to a MongoDB Atlas cluster. To learn more about the ``+srv`` option, see - :manual:`Connection String Formats ` - in the {+mdb-server+} manual. +- ``+srv``: Include this option in your connection string prefix only if you are + connecting to a MongoDB Atlas cluster. If you're using a + ``MongoClientSettings`` object, you can specify the ``srv`` format by setting + the ``Scheme`` property to ``ConnectionStringScheme.MongoDBPlusSrv``. To learn + more about the ``+srv`` option, see :manual:`Connection String Formats ` in the + {+mdb-server+} manual. - ````: The network address of your MongoDB deployment. - ````: The port number of the MongoDB deployment. If you omit this parameter, the driver uses the default port number (``27017``). You don't need a port number