Search code examples
entity-frameworkweb-configmembership-provider

DefaultMembershipProvider using Entity Framework connection string?


   <membership defaultProvider="DefaultMembershipProvider">
      <providers>
        <add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DbString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
      </providers>
    </membership>

Is there a way to make the default providers work with a connection string with providerName="System.Data.EntityClient"? I have EF set up for my main app and I have another connection string providerName="System.Data.SqlClient" just for providers and it's kind of annoying.


Solution

  • I found the answer. Apparently the System.Data.EntityClient connection string only works for use with Entity Framework queries and not ASP.NET Providers.

    Entity Framework data provider not found, entityclient