2

I am trying to add ASP.NET Simple Membership to my MVC 5 application. When the application start the initialization part in Global.asax.cs - Application_Start() gives me the following error:

Unable to find the requested .Net Framework Data Provider. It may not be installed.

I'm initializing the membership by calling

WebSecurity.InitializeDatabaseConnection("CareerEntities", "UserProfile", "UserId", "UserName", true);

I have following connection string (I'm using Entity framework Database first)

<add name="CareerEntities" connectionString="metadata=res://*/Models.Career.csdl|res://*/Models.Career.ssdl|res://*/Models.Career.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.\SQLEXPRESS;initial catalog=Career;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

I tried to change the provider name to be "System.Data.SqlClient" but it didn't work either

Amr Ramadan
  • 1,259
  • 5
  • 18
  • 29

1 Answers1

1

I found the solution Here

Also I had a mistake that i should define the Default connection with "System.Data.SqlClient" and the other Entity framework connection "System.Data.EntityClient"

Community
  • 1
  • 1
Amr Ramadan
  • 1,259
  • 5
  • 18
  • 29