Simple Membership gives me Unable to find the requested .Net Framework Data Provider

▼魔方 西西 提交于 2019-12-12 18:34:04

问题


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


回答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"



来源:https://stackoverflow.com/questions/21797823/simple-membership-gives-me-unable-to-find-the-requested-net-framework-data-prov

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!