Error in autogenerated mysql memebership/profile and role provider tables
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 c开发者_Go百科olumn 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>
Try latest MySQL .NET Connector, ver. 6.3.6
精彩评论