EF与oracle - “指定的存储提供程序不能在配置中找到或无效。 [英] EF with oracle - "The specified store provider cannot be found in the configuration, or is not valid."

查看:1406
本文介绍了EF与oracle - “指定的存储提供程序不能在配置中找到或无效。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在生产机器中,我收到以下错误:

>

  System.ArgumentException:在配置中找不到指定的存储提供程序,或无效。 ---> System.ArgumentException:无法找到请求的.Net框架数据提供程序。它可能没有安装。 
在System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
在System.Data.EntityClient.EntityConnection.GetFactory(String providerString)

开发机器没有错误。
在生产计算机上还有其他.net程序可以使用odp.net成功运行oracle。
这些旧程序是使用.net 3.5。



我明白,因为.net 4.5安装Orcale客户端后安装oracle
数据访问组件未注册在.net 4.5 machine.config中。
我尝试将system.data部分从3.5 machine.config复制到应用程序的配置文件中 - 但是没有帮助。
重新安装Oracle客户端不是我们想要做的 - 因为其他应用程序可以正常工作。



我也注意到有一个小的差异在开发机器和生产之间的ODP.Net版本中。
我的项目没有任何对oracle.dataaccess.dll的引用。

解决方案

确保您的ASP.NET应用程序正在使用的应用程序池允许32位应用程序。使用管理工具下的Internet Information Services(IIS)管理器工具配置您的Web应用程序和相应的池。 (在IIS管理器中查找池,右键单击它,然后选择高级设置。)否则您的应用程序可能运行在64位模式,并寻求一个64位版本的Oracle数据提供程序可能不存在于您的机器。


I am using entity framework with oracle client (odp.net) in a .net 4.5 program.

In production machine I get the following error:

System.ArgumentException: The specified store provider cannot be found in the configuration, or is not valid. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider.  It may not be installed.
   at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
   at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)

No error on development machine. There are other .net programs on the production machine that run successfully against oracle using odp.net. These old programs are with .net 3.5.

I understood that because .net 4.5 was installed after the Orcale client installation the oracle data access components are not registered in .net 4.5 machine.config . I tried copying the system.data section from the 3.5 machine.config into the application's config file - but it did not help. Reinstalling Oracle client is not something we would like to do - because of the other appllcations that work fine.

I also noticed that that there is a minor difference in the ODP.Net version between the development machine and production. My project does not have any reference to oracle.dataaccess.dll.

解决方案

If you are on a 64-bit system, make sure the application pool that your ASP.NET app is using allows 32-bit applications. Use Internet Information Services (IIS) Manager tool under Administration Tools to configure your web app and the corresponding pool. (Find the pool in the IIS Manager, right-click on it and select Advanced Settings.) Otherwise your application may run in the 64-bit mode and seek a 64-bit version of the Oracle data provider which may not be present on your machine.

这篇关于EF与oracle - “指定的存储提供程序不能在配置中找到或无效。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆