1

For the first time I am trying to use the build in membership/role and profile provider in MySQL .NET Connector 6.2.3 and I’m using the auto generate schema property in my web.config. However, I’m experience some strange problems. When I’m running the website local I have no problems creating roles, users etc. in my local database, but when I deploy it on my web server the tables generated looks different from the locals and not all tables contains the same columns or use the same naming. E.g. the role table is named “my_aspnet_roles” local but “my_aspnet_Roles” on the server and the column containing the role name is named “name” local but “Rolename” on the server, which means that none of the providers works online? Is there something that I am missing?

Here is my config file with all the setup for the providers:

<connectionStrings>
    <add name="LocalMySqlServer" connectionString="server=127.0.0.1;database=user_test;user id=root;pwd=1234"/>
</connectionStrings>
<membership defaultProvider="MySQLMembershipProvider">
        <providers>
            <remove name="MySQLMembershipProvider"/>
            <add name="MySQLMembershipProvider" autogenerateschema="true" connectionStringName="LocalMySqlServer" applicationName="my_app" passwordFormat="Hashed" type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
        </providers>
    </membership>
    <profile enabled="true" defaultProvider="MySQLProfileProvider">
        <providers>
            <remove name="MySQLProfileProvider"/>
            <add name="MySQLProfileProvider" autogenerateschema="true" connectionStringName="LocalMySqlServer" applicationName="my_app" type="MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
        </providers>
    </profile>
    <roleManager enabled="true" defaultProvider="MySQLRoleProvider">
        <providers>
            <remove name="MySQLRoleProvider"/>
            <add name="MySQLRoleProvider" autogenerateschema="true" connectionStringName="LocalMySqlServer" applicationName="my_app" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
        </providers>
    </roleManager>
abatishchev
  • 98,240
  • 88
  • 296
  • 433
aweis
  • 5,350
  • 4
  • 30
  • 46
  • What command are you running locally and on server? Are providers' version are equal? – abatishchev Mar 13 '11 at 16:11
  • I don't know about possible commands that are called, but the providers should be the same, they should be placed in the MySql.web.dll, which I include in my bin folder. The tables are generated the first time the application is entered (the website is visited) so I have no control over how they are created! Furthermore, the website is hosted a place where I have no control over the configurations, so I’m not sure if they can “override” my providers with some they have? – aweis Mar 13 '11 at 16:18

1 Answers1

0

Try latest MySQL .NET Connector, ver. 6.3.6

abatishchev
  • 98,240
  • 88
  • 296
  • 433
  • It is getting close :) the tables are still named with uppercase (the last part) but a quick look tells me that the columns are correct, so i think it can be fixed by just renaming the tables now. I will just work a bit more on it to test it :) – aweis Mar 13 '11 at 16:33
  • After further investigation I can see that it is fixed in this version, the new naming is accepted in the new providers and my roles etc. are now in my database – Thanks – aweis Mar 13 '11 at 16:44