Question

I am trying to build a social networking site with all kinds of complex relationships.

So far, I have been able to add Users into the MySql database. That works. I think since I can insert based off the entity context, ModelFirstContainer, it is safe to assume the connection string and providers would be correct, right?

However, since I've added Simple Membership I get 3 different errors depending on my WebSecurity:

  1. Keyword not supported: 'metadata'.
  2. Unable to find the requested .Net Framework Data Provider. It may not be installed.
  3. InvalidOperationException was unhandled by user code: No user table found that has the name "Users"

Here is my WebSecurity: WebSecurity.InitializeDatabaseConnection("ModelFirstContainer", "Users", "Id", "Email", false);

Here is my connection string:

    <connectionStrings>
      <add name="ModelFirstContainer" connectionString="metadata=res://*/DataModel.ModelFirst.csdl|res://*/DataModel.ModelFirst.ssdl|res://*/DataModel.ModelFirst.msl;provider=MySql.Data.MySqlClient;provider connection   string=&quot;server=111.111.111;user id=BROMANCe;password=******;database=bromance&quot;"/>
 </connectionStrings>

I am at a loss. While fiddling with EF, I found out that the MySql EntityFramework extension only works with EF 5.0. How do I connect to the mySql database using Simple Membership MVC4?

Was it helpful?

Solution

After hours of searching online for some solution to get MySQL to work with Microsoft's WebSecurity, it doesn't. MySQL is not supported in Microsoft's WebSecurity SimpleMembership Authorization. :/

Bummer. I had to switch to Sql Sever in the end. I wasted a lot of time configuring EntityFramework to work with MySQL. Turns out, EF 6.0 does NOT support MySQL but EF 5.0 DOES.

Hopefully this question can save some people's time.

Here's source: http://forums.asp.net/t/1766451.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top