Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As friism mentions, you need some code to read the connectionString from an appSetting. Thankfully <a href="https://github.com/osuritz" rel="nofollow">osuritz</a> has already done the work in a fork of <a href="https://github.com/osuritz/MongoDB.Web/commit/b1e9534023ca8cb2e74eb1adbdcb1cd7dd693efa" rel="nofollow">MongoDB.Web</a> on github.</p> <p>You will need to download the above fork, build &amp; change your existing dll reference to use the new dll.</p> <p>Then...</p> <p>change your config:</p> <pre><code>&lt;appSettings&gt; &lt;add key="MONGOLAB_URL" value="mongodb://localhost/ASPNETDB"/&gt; &lt;/appSettings&gt; </code></pre> <p>... the above value will get replaced by appharbor/mongolab (and if you have other parts of the app that work, then this is correct)</p> <pre><code>&lt;providers&gt; &lt;clear /&gt; &lt;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" /&gt; &lt;/providers&gt; </code></pre> <p>So in the above config, it has the appSettingsConnectionStringKey parameter. The code within the customised provider, reads the appSettingsConnectionStringKey value 'MONGOLAB_URL' and then uses that to read the ConfigurationManager.AppSettings["MONGOLAB_URL"] and it obviously, MUST match the appsetting Key name above.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload