I’m attempting to use MongoDB’s Client Side Field Level Encryption feature. I have code in .NET 9 running on my Windows 11 machine that is attempting to a write a document with some encrypted fields to a MongoDB Atlas database. I have copied over the mongo_crypt_v1.dll file to a local folder - bin/crypt_shared/mongo_crypt_v1.dll and have specified the “cryptSharedLibPath” in the extraOptions when setting AutoEncryptionOptions. I’m however getting the following error -
Unhandled exception. MongoDB.Driver.MongoConfigurationException: No AutoEncryption provider has been registered.
at MongoDB.Driver.Encryption.AutoEncryptionProviderRegistry.CreateAutoCryptClientController(IMongoClient client, AutoEncryptionOptions autoEncryptionOptions)
at MongoDB.Driver.MongoClient…ctor(MongoClientSettings settings)
I have made sure that the program is able to access the mongo_crypt_v1.dll.
What am I missing?