Bug #64470 MySQLProfileProvider throws InvalidCastException
Submitted: 27 Feb 2012 15:48 Modified: 10 Aug 2012 6:52
Reporter: Martijn Kagie Email Updates:
Status: Closed Impact on me:
Category:Connector / NET Severity:S2 (Serious)
Version:MySQL Connector Net 6.4.4 OS:Windows
Assigned to: Roberto Ezequiel Garcia Ballesteros CPU Architecture:Any

[27 Feb 2012 15:48] Martijn Kagie
When calling the function ProfileManager.DeleteProfiles when using the MySqlProfileProvider an InvalidCastException is thrown. 

When looking at the corresponding source-file, it seems that when the user-id corresponding to the user-name is read, this id is casted to a ulong while it should be casted to a int32.

How to repeat:
Call the function ProfileManager.DeleteProfiles to delete one or more profiles from an asp.net profile data base. 

Suggested fix:
Change the cast in ProfileProfider.DeleteProfiles from ulong to int
[10 Aug 2012 6:52] John Russell
Added to changelog for 6.4.6, 6.5.5: 

When using the MySqlProfileProvider, calling the function
ProfileManager.DeleteProfiles could throw an InvalidCastException
[12 Sep 2012 17:17] Fernando Gonzalez.Sanchez
This fix is also available in 6.6.x versions starting 6.6.1 (currently 6.6.2 is the most current).