Bug #44655 6.0.3.0 connector for asp.net does not report the number of roles correctly
Submitted: 4 May 2009 23:28 Modified: 5 May 2009 9:57
Reporter: Larry Dick Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:6.0.3.0 OS:Windows
Assigned to: CPU Architecture:Any

[4 May 2009 23:28] Larry Dick
Description:
In vs 2008, the WSAT tool does not report the number of roles that have been created correctly.

How to repeat:
This is easy to duplicate:
Just create a project, enable roles.  Load up a web.config to point at mysql.
Now open up the wsat tool. Create some roles.  Now try to create some users.
then go back to the roles. It reports 0 roles.  Now add a new role, it shows All the roles that have been created so far.

Now try to assign a user a role and you will see that there are no roles to be assigned.

NOTE: in the default db , aspnetdb  all the roles are present.
The db was generated from the Command Line, and then the tables were added by using autogenerateschema=true in web.config.

I've chased this problem  into the routine   MySQLRoleProvider.GetRolesByUserName().   In my instance of the aspnetdb the applicationId == 1 for all the roles I've created in my_aspnet_roles.

Yet, at the time the code executes in GetRolesByUserName the value of the App.Id that it uses is -1. -- set in the constructor.

I do not see any code in the connector system that would cause App.Id to be set.
[5 May 2009 9:57] Tonci Grgin
Hi Larry and thanks for your report.

Looking into BugsDB I think this is a duplicate of Bug#44414 and should be dealt with there. As you can see from that report, I have numerous problems regarding roles and, unfortunately, nothing seems as simple as you said so it might take some time.