简体   繁体   English

带有oracle的EF-“在配置中找不到指定的存储提供程序,或者它无效。”

[英]EF with oracle - “The specified store provider cannot be found in the configuration, or is not valid.”

I am using entity framework with oracle client (odp.net) in a .net 4.5 program. 我在.net 4.5程序中使用带有Oracle客户端(odp.net)的实体框架。

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. 生产机器上还有其他.net程序,它们使用odp.net针对oracle成功运行。 These old programs are with .net 3.5. 这些旧程序带有.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 . 我了解到,因为在Orcale客户端安装之后安装了.net 4.5,所以oracle数据访问组件未在.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. 我尝试将3.5 machine.config中的system.data部分复制到应用程序的配置文件中-但这没有帮助。 Reinstalling Oracle client is not something we would like to do - because of the other appllcations that work fine. 重新安装Oracle客户端不是我们想要做的事情-因为其他应用程序可以正常工作。

I also noticed that that there is a minor difference in the ODP.Net version between the development machine and production. 我还注意到开发机器和生产机器之间的ODP.Net版本之间存在微小差异。 My project does not have any reference to oracle.dataaccess.dll. 我的项目没有对oracle.dataaccess.dll的任何引用。

Can you run the Oracle installer for ODAC on the production machine? 您可以在生产计算机上运行ODAC的Oracle安装程序吗? That will create the required machine.config entries. 这将创建所需的machine.config条目。

Also in a the currently available beta, we offer a "local" install which modifies the web or app config rather than the machine config. 另外,在当前可用的Beta中,我们提供了“本地”安装,可修改Web或应用程序配置,而不是计算机配置。

May be you just installed the 32 bit version on the 64 operating system. 可能是您在64操作系统上安装了32位版本。 In run time you also need to install 64 bit version. 在运行时,您还需要安装64位版本。

be sure you add the tns file and reastart after installation 确保您添加了tns文件并在安装后重新启动

If you are on a 64-bit system, make sure the application pool that your ASP.NET app is using allows 32-bit applications. 如果您使用的是64位系统,请确保ASP.NET应用程序使用的应用程序池允许32位应用程序。 Use Internet Information Services (IIS) Manager tool under Administration Tools to configure your web app and the corresponding pool. 使用管理工具下的Internet Information Services(IIS)管理器工具来配置Web应用程序和相应的池。 (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. (在IIS管理器中找到该池,右键单击它,然后选择“高级设置”。)否则,您的应用程序可能会以64位模式运行,并寻找Oracle数据提供程序的64位版本,而该版本可能未出现在您的Oracle数据提供程序中。机。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 EntityFramework,在配置中找不到指定的商店提供商,或者无效 - EntityFramework,The specified store provider cannot be found in the configuration, or is not valid MySQL实体框架错误 - 在配置中找不到指定的商店提供程序,或者无效 - MySQL Entity Framework Error - The specified store provider cannot be found in the configuration, or is not valid 指定的演员表无效。 林克 - specified cast is not valid. linq 指定的命名连接在配置中找不到,不打算与EntityClient提供程序一起使用,或者无效 - The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid 指定的演员表无效。 枚举 - Specified cast is not valid. enum 指定的EF6模式无效。 错误:由于类型y不可用,所以未加载关系x - EF6 Schema specified is not valid. Errors: The relationship x was not loaded because the type y is not available 加载WPF设计器时出现异常“指定的命名连接…与EntityClient提供程序,否则无效。” - Exception “The specified named connection… with the EntityClient provider, or not valid.” while loading WPF designer 指定演员表无效。 在创建图表时 - Specified cast is not valid. when creating chart 指定演员表无效。 C#WebBrowser - Specified cast is not valid. C# WebBrowser 自动映射器显示错误“指定的转换无效。” - automapper showing error “Specified cast is not valid.”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM