Skip to content

added documentation for using SSL support in the .NET driver. #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions source/administration/ssl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,23 @@ To connect to a replica set via SSL, use the following form:
);

.. _`node-mongodb-native`: https://github.com/mongodb/node-mongodb-native

.NET
~~~~
As of release 1.6 of the .NET driver, to use SSL with a server, all that is needed
is to add an option to the connection string, "ssl=true".

.. code-block:: csharp

var connectionString = "mongodb://localhost/?ssl=true";
var server = MongoServer.Create(connectionString);

Using SSL in the .NET driver will cause the server certificates to get validated
against the local trusted certificate store. This can cause issues in testing due
to test machines not having trusted certificates. If this is the case, you can
add another option to prevent validating the certificates, "sslverifycertificate=false".

.. code-block:: csharp

var connectionString = "mongodb://localhost/?ssl=true&sslverifycertificate=false";
var server = MongoServer.Create(connectionString);