views:

668

answers:

3

Hey guys and gals running into a little issue here.. I'm trying to use MySql Connector 6.2.2.0 for membership and role providers..

The issue I'm having is: Unable to initialize provider. Missing or incorrect schema.

<authentication mode="Forms"/>
<roleManager defaultProvider="MySqlRoleProvider"
    enabled="true"
    cacheRolesInCookie="true"
    cookieName=".ASPROLES"
    cookieTimeout="30"
    cookiePath="/"
    cookieRequireSSL="false"
    cookieSlidingExpiration="true"
    cookieProtection="All" >
  <providers>
    <clear />
    <add
        name="MySqlRoleProvider"
        type="MySql.Web.Security.MySQLRoleProvider, MySql.Web,
        Version=6.2.2.0,Culture=neutral, PublicKeyToken=c5687fc88969c44d"   
        connectionStringName="mySQL"
        applicationName="capcafe"
        writeExceptionsToEventLog="true"
    />
  </providers>
</roleManager>
<membership defaultProvider="MySqlMembershipProvider">
   <providers>
      <add connectionStringName="mySQL" 
         applicationName="capcafe" 
         minRequiredPasswordLength="5"
         requiresQuestionAndAnswer="false" 
         requiresUniqueEmail="false"
         minRequiredNonalphanumericCharacters="0" 
         name="MySqlMembershipProvider"
         type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.2.2.0,
         Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
   </providers>
</membership>

Here is the line it doesn't seem to like:

Line 57:             type="MySql.Web.Security.MySQLRoleProvider, MySql.Web,
Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"

I have both MySql.Web and MySql.Data referenced and in my bin! Any help resolving this issue will be very much appreciated

A: 

Add references to the assemblies, add autogenerateschema="true" attribute to both as:

<providers>
<remove name="MySQLProfileProvider"/>
<add name="MySQLProfileProvider" autogenerateschema="true" type="MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=6.2.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/"/>
</providers>

use ASP.Net configuration tool.

Wooer
A: 

I had this problem, it turned out there was no password in my connection string, I think checking carefully that your connection string is correct would be a good place to start.

Simon Hodgson
A: 

Same problem here but setting theautogenerateschema isn't the solution.

What else can it be?