I'm facing with strange problem with SimpleMembershipProvider. I ran an example MVC4 project in VS11 and created my own database which contains table "userprofile" with two fields "UserId" and "UserName". Moreover I connected my MySQL database with Entity Framework and generated model from the DB.
Then I tried to deal with membership provider and I faced with some problems. Actualy, I've done everything what is written in this article:
No reason why in line with:
WebSecurity.InitializeDatabaseConnection("ParserEntities", "userprofile", "UserId", "UserName", autoCreateTables: true);
I'm getting an exception:
The ASP.NET Simple Membership database could not be initialized. For more information, please see http://go.microsoft.com/fwlink/?LinkId=256588"}
That's how my connection string looks like:
<add name="ParserEntities" connectionString="metadata=res://*/ParserModel.csdl|res://*/ParserModel.ssdl|res://*/ParserModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=localhost;user id=root;database=parser"" providerName="System.Data.EntityClient" />
Thanks for any help!