title: ASP.NET: "Default Membership Provider could not be found" error
body: <p>In ASP.NET Web Application, i attempted to use login control with the connected database I got this error:</p>
  
  <blockquote>
    <p>Default Membership Provider could not be found.</p>
  </blockquote>
  
  <p>Why is membership provider giving this error?</p>
  
  <p><code>web.config</code> file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    --&gt;
  &lt;configuration&gt;
    &lt;connectionStrings&gt;
      &lt;add name="ResearchClub" connectionString="Data Source=PSYCOZ;Initial Catalog=ResearchClub;Integrated Security=True"/&gt;
    &lt;/connectionStrings&gt;
  
    &lt;appSettings&gt;
      &lt;add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/&gt;
    &lt;/appSettings&gt;
  
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5.2"/&gt;
      &lt;httpRuntime targetFramework="4.5.2"/&gt;
  
      &lt;authentication mode="Forms"/&gt;
  
      &lt;membership&gt;
        &lt;providers&gt;
          &lt;clear/&gt;
          &lt;remove name="ResearchClubMembershipProvider"/&gt;
          &lt;add name="ResearchClubMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ResearchClub"
               enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
               maxInvalidPasswordAttempts="10" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10"
               applicationName="/"/&gt;
        &lt;/providers&gt;
      &lt;/membership&gt;
  
    &lt;/system.web&gt;
  
    &lt;system.codedom&gt;
      &lt;compilers&gt;
        &lt;compiler language="c#;cs;csharp" extension=".cs"
          type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/&gt;
        &lt;compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
          type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&amp;quot;Web\&amp;quot; /optionInfer+"/&gt;
      &lt;/compilers&gt;
    &lt;/system.codedom&gt;
  &lt;/configuration&gt;
  </code></pre>