As mentioned in friism, you need code to read connectionString from appSetting. Fortunately, osuritz has already done the work in the MongoDB.Web fork on github.
You will need to download the above fork, create and modify the existing dll link to use the new dll.
Then...
change the configuration:
<appSettings> <add key="MONGOLAB_URL" value="mongodb://localhost/ASPNETDB"/> </appSettings>
... the above value will be replaced by appharbor / mongolab (and if you have other parts of the application that work, then this is correct)
<providers> <clear /> <add name="MongoDBMembershipProvider" type="MongoDB.Web.Providers.MongoDBMembershipProvider" applicationName="/" appSettingsConnectionStringKey="MONGOLAB_URL" collection="Users" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" /> </providers>
So, in the above configuration, it has the appSettingsConnectionStringKey parameter. The code inside the custom provider reads the value of appSettingsConnectionStringKey "MONGOLAB_URL", and then uses it to read ConfigurationManager.AppSettings ["MONGOLAB_URL"], and it obviously MUST match the specified add key name.
source share