❔ MongoDB.Driver.MongoConnectionException:
Hi, I have problem with finding document in MongoDB collection. Whenever method collection.find is fired, it throws this error:
MongoDB.Driver.MongoConnectionException: An exception occurred while opening a connection to the server. ---> System.MissingMethodException: void System.Security.Cryptography.Rfc2898DeriveBytes..ctor(string,byte[],int,System.Security.Cryptography.HashAlgorithmName)
here's code:
I'm using .NET framework 4.8.1, mongoDB 2.19.1 and Scram-SHA-1.
Anyone know why it's happening?
7 Replies
Missing method exception is a binary mismatch of some sort. E.g running in wrong runtime, or loading wrong versions of libs
So I should downgrade Mongodb version?
The version you mentioned should work, so it's probably something local on your machine that is setup wrong
So what I should do in that case?
go through the various suggestions here
https://stackoverflow.com/questions/8058832/system-missingmethodexception-method-not-found
Stack Overflow
System.MissingMethodException: Method not found?
Previous working asp.net webforms app now throws this error:
System.MissingMethodException: Method not found
The DoThis method is on the same class and it should work.
I have a generic handler as...
I tried everything, nothing worked 😕
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.