Thursday, April 14, 2011

'System.Web.Security.SqlMembershipProvider' requires a databse schema compatible with schema version '1'.

Hi, i want to use profiles and was able to use aspent_regsql -A p to install the tables. I can see them throught SQL management studio.

Im actually using SQLExpress 2005, and my dbo.aspnet_SchemaVersions is populated. Does anybody know what could be going wrong?

By the way, im preety sure my connection string and app code are allright. Thanks in advance.

<system.web>
<membership>

  <providers>

    <remove name="AspNetSqlMembershipProvider" />

    <add name="AspNetSqlMembershipProvider"

      type="System.Web.Security.SqlMembershipProvider,

       System.Web, Version=2.0.0.0, Culture=neutral,                                

       PublicKeyToken=b03f5f7f11d50a3a"

      connectionStringName="RGConnectionString" />

  </providers>

</membership>
<profile>
  <providers>
    <add name="ProfileProvider" type="System.Web.Security.SqlProfileProvider,

       System.Web, Version=2.0.0.0, Culture=neutral,                                

       PublicKeyToken=b03f5f7f11d50a3a"

      connectionStringName="RGConnectionString"/>
  </providers>
From stackoverflow
  • Well, fool of me. i was quite sure it was a problem with sql express databases but it was actually my web.config file that was totally weird. i got it to work by adding the correct properties to the providers

    <system.web>
    <membership>
    
      <providers>
    
        <remove name="AspNetSqlMembershipProvider" />
    
        <add name="AspNetSqlMembershipProvider"
    
             type="System.Web.Security.SqlMembershipProvider,
    
           System.Web, Version=2.0.0.0, Culture=neutral,                                
    
           PublicKeyToken=b03f5f7f11d50a3a"
    
             connectionStringName="RGConnectionString" 
    
             enablePasswordRetrieval="true"
    
             enablePasswordReset="true"
    
             requiresQuestionAndAnswer="true"
    
             requiresUniqueEmail="true"
    
             passwordFormat="Clear"
    
             maxInvalidPasswordAttempts="5"
    
             minRequiredPasswordLength="8"
    
             minRequiredNonalphanumericCharacters="0"
    
             passwordAttemptWindow="10"
    
             passwordStrengthRegularExpression="" 
    
             applicationName="/"
    

    />

      </providers>
    
    </membership>
    <profile>
      <providers>
        <add name="ProfileProvider" type="System.Web.Profile.SqlProfileProvider,
    
           System.Web, Version=2.0.0.0, Culture=neutral,                                
    
           PublicKeyToken=b03f5f7f11d50a3a"
    
             connectionStringName="RGConnectionString"
    
             applicationName="/" />
    

0 comments:

Post a Comment