MVC: 找不到请求的 .Net Framework Data Provider。可能没有安装

遇到这个问题,我是下载SQL Server Compact 4.0 安装后就可以解决。下载地址是:

http://www.microsoft.com/downloads/zh-cn/details.aspx?familyid=033cfb76-5382-44fb-bc7e-b3c8174832e2&displaylang=zh-cn

在寻找解决办法的时候还找到一个学习MVC的例子,MVC music store  http://mvcmusicstore.codeplex.com/ 我现在学习的例子是ContosoUniversity

在寻找解决方法时,找到几个解答,在这里收集起来。

 

在C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG中machine.config(xml文件)中有一个字段是<DbProviderFactories>

添加注册,<name= "SqlClient Data Provider">或者<name="MySQL Data Provider"

<system.data>

    <DbProviderFactories>

      <add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

      <add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

      <add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

      <add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

      <add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

     <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL"type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=5.0.2.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />

<add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

    </DbProviderFactories>

</system.data>

 

在最后面我想添加一些MVC开发需要安装的软件,

Before you start, make sure you have the following software installed on your computer:
Visual Studio 2010 SP1 or Visual Web Developer Express 2010 SP1 (If you use one of these links, the following items will be installed automatically.)
 ASP.NET MVC 3 Tools Update
 Microsoft SQL Server Compact 4.0
 Microsoft Visual Studio 2010 SP1 Tools for SQL Server Compact 4.0

阅读更多
个人分类: 技术学习
上一篇防止汉字乱码,转化UTF-8字符
下一篇MVC自定义img控件方法
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭