Last post Apr 14, 2015 03:28 AM by Mikesdotnetting
Apr 13, 2015 01:20 PM|jk000|LINK
Right now we are developing MVC 4 application using Visual studio 2010 and MySQL as a database. I would like to understand is it possible to use Simplememebership provider using MySQL and utilizing existing user table.
I can find lot of solutions proposed but none of them works with Visual Studio 2010 and after all configurations I get the same error listed below.
To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider".
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: To call this method, the "Membership.Provider" property must be an instance of "ExtendedMembershipProvider".
But in the database I can find the following tables created.
my_aspnet_usersinroles, my_aspnet_users, my_aspnet_sitemap, my_aspnet_sessions, my_aspnet_sessioncleanup, my_aspnet_schemaversion, my_aspnet_roles, my_aspnet_profiles,
my_aspnet_personalizationperuser, my_aspnet_personalizationallusers, my_aspnet_paths, my_aspnet_membership, my_aspnet_applications, my_aspnet_usersinroles
I’m not sure is it because of Visual Studio 2010 version, I’m unable get this working properly. Is there any solution?
My working environment:
Visual Studio 2010 MVC 4,
MySQL Connector Version=184.108.40.206,
Entity Framework 6
Thanks in advance.
Apr 14, 2015 03:28 AM|Mikesdotnetting|LINK
The SimpleMembership provider doesn't support MySQL. Your only option (if you want to use an ExtendedMembershipProvider-based solution) is to implement your own custom provider, or look for one that someone else might already have created, like this one: https://github.com/xyz37/MySqlSimpleMembershipProvider