title: ASP.NET MVC Custom Membership Provider Web.config Error
body: <p>I have implemented a custom membership provider using LINQ to SQL. When I added the Membership provider to my asp.net mvc website in the web config the logon page stopped working.</p>
  
  <p>My Web.config setup:</p>
  
  <pre><code>&lt;membership&gt;
    &lt;providers&gt;
    &lt;clear/&gt;
      &lt;add 
        name="MyMembershipProvider" 
        type="MyMembership.MyMembershipProvider"
        connectionStringName="ApplicationServices" 
        enablePasswordRetrieval="false" 
        enablePasswordReset="true" 
        requiresQuestionAndAnswer="false" 
        requiresUniqueEmail="false" 
        passwordFormat="Hashed" 
        maxInvalidPasswordAttempts="5" 
        minRequiredPasswordLength="6" 
        minRequiredNonalphanumericCharacters="0" 
        passwordAttemptWindow="10" 
        passwordStrengthRegularExpression="" 
        applicationName="/"/&gt;
    &lt;/providers&gt;
  &lt;/membership&gt;
  </code></pre>
  
  <p>The error I get is the following:</p>
  
  <p><strong>Parser Error Message:</strong> Default Membership Provider could not be found.</p>
  
  <p><strong>Source Error:</strong></p>
  
  <pre><code>Line 53:            &lt;forms loginUrl="~/Account/LogOn" timeout="2880"/&gt;
  Line 54:        &lt;/authentication&gt;
  Line 55:        &lt;membership&gt;
  Line 56:            &lt;providers&gt;
  Line 57:                &lt;clear/&gt;
  </code></pre>
  
  <p>I am stuck on where to proceed from here. I can't set a break point since the error seems to be called out of the main code.</p>
  
  <p>I am using the standard membership code that comes with the default project of asp.net mvc. The membership provider is implemented in a separate assembly that is included in the web project.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thanks! </p>