Search code examples
asp.netconfigurationmembership-providerproduction-environmentroleprovider

How to effectively set up MySQL Users and Roles in the production server WITHOUT Visual Studio?


So far I have been using the WebSite Administration Tool built in Visual Studio 2010 to manage Users and Roles along with MySQL Membership and Roles Provider.

Now, I have deployed the application to the production server and I am getting the following error:

enter image description here

Even if I tried to copy one of the roles and one of the users from my local DB to the one used by the production server, it didn't quite work and I keep getting the same error. At least, I'm sure that's the cause of the error because I did a remote debugging which led me to find it.

At this point I am very confused on how to get it working properly. So, any help or guidance would be really appreciated.

EDIT: At this point the User has been already authenticated in the login page using the connectionString to the production DB server. For that reason, I have dismissed any kind of problems related to the connectionString. I get this error while loading the masterPage where the role is needed in order to choose which menu to display.


Solution

  • The solution for this problem was to create the mysql_aspnet_membership provider by granting full access through the machine.config and autogenerating the schema, instead of manually creating the membership tables in the database, which I though there could have been a valid way to create the db.

    Afterwards, this didn't break anymore.