C# 找不到请求的.NET Framework数据提供程序。它可能没有安装。在ASP.NETMVC4中
我正在尝试使用ASP.NETMVC4和EntityFramwork数据库第一个模型添加成员资格提供程序。我将VS Express 2012用于web、EF 5和MVC 4 我的解决方案中有两个项目C# 找不到请求的.NET Framework数据提供程序。它可能没有安装。在ASP.NETMVC4中,c#,asp.net,entity-framework,asp.net-mvc-4,asp.net-membership,C#,Asp.net,Entity Framework,Asp.net Mvc 4,Asp.net Membership,我正在尝试使用ASP.NETMVC4和EntityFramwork数据库第一个模型添加成员资格提供程序。我将VS Express 2012用于web、EF 5和MVC 4 我的解决方案中有两个项目 iTMS.DAL-包含现有数据库的EntityDatamodel iTms.网站-包含MVC4项目 我做了以下事情 使用aspnet\u regsql.exe在SQL server 2014中创建成员资格表 修改了InitializeSimpleMembershipAttribute类以使用我的ent
iTMS.DAL
-包含现有数据库的EntityDatamodeliTms.网站
-包含MVC4项目aspnet\u regsql.exe
在SQL server 2014中创建成员资格表 private class SimpleMembershipInitializer
{
public SimpleMembershipInitializer()
{
Database.SetInitializer<UsersContext>(null);
try
{
using (var context = new UsersContext())
{
if (!context.Database.Exists())
{
// Create the SimpleMembership database without Entity Framework migration schema
((IObjectContextAdapter)context).ObjectContext.CreateDatabase();
}
}
// WebSecurity.InitializeDatabaseConnection("DefaultConnection", "UserProfile", "UserId", "UserName", autoCreateTables: true);
WebSecurity.InitializeDatabaseConnection("Entities", "aspnet_Users", "UserId", "UserName", autoCreateTables: true);
}
catch (Exception ex)
{
throw new InvalidOperationException("The ASP.NET Simple Membership database could not be initialized. For more information, please see http://go.microsoft.com/fwlink/?LinkId=256588", ex);
}
}
}
如何解决这个问题?重复问题。这已经被问过很多次了
嗨,兰迪。。第一个链接没有标记正确答案。第二个链接不用于使用EntityFramWork此特定错误与EntityFramework无关。这是ADO.NET无法为您尝试连接的数据库找到正确的数据提供程序的直接结果。您是否尝试了第二个链接中建议的解决方案?我有如何更改它的方法。您可以提供您的web.config文件的副本吗?更具体地说,我希望看到连接字符串条目的不变名称。Randy,我如何向您提供它?您是否曾经得到过特定问题的答案?
{"Unable to find the requested .Net Framework Data Provider. It may not be installed."}