ODP.NET error Unable to find the Requested .Net Framework Data Provider

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 01:32:59

Try this connection string format:

Provider=msdaora;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;

Check out connection string examples for Oracle db http://www.connectionstrings.com/oracle

For us it was 32 vs. 64 bit process.

The server is 64 bit. The ODP.NET (Oracle Client) installed is also 64 bit. Our application compiled with the Target platform "Any CPU" and "Prefer 32-bit" flag SET:

http://grab.by/v5ki

was running as 32 bit process. Once recompiled with the flag un-checked everything started to work.

lakant

I got the same error when opening the page via IIS, 64bit Win7.

My solution is:

Go to IIS manager --> Application Pool --> Advanced Settings --> Enable 32-Bit Applications.

This error is a little misleading because it can also be caused by running under the wrong CPU contexts. Make sure you are allowing for 32-bit if using a 32-bit Oracle driver. This can be done as a setting under IIS or you can setup your application to run as an IIS Express application.

I had a similar problem. It was resolved by adding a NuGet package. I already had Oracle.ManagedDataAccess.EntityFramework available in my references from the install of ODT but it was giving an Entity Framework 5 conflict with 6 in the detailed log. Once I added the NuGet package, everything started working.

  • To install, right click References --> Manage NuGet Packages… --> Search for Oracle in the Browse tab --> Choose Oracle.ManagedDataAccess.EntityFramework and install the latest version.

Another possible solution for someone out there.

My webapp was working well on my test server but when I started to develop for my live server I got the same error: Unable to find the requested .Net Framework Data Provider. It may not be installed

If you compare the two connection strings below you will notice that the one causing my issue had the "Managed" word in the provider name. I'm actually using the unmanaged version of the Oracle provider. Hence I was getting the error on my live server and not on my test server.

    **ORIGINAL:**
    connectionString="DATA SOURCE=192.168.10.101:1521/dataconn;PASSWORD=password;PERSIST   SECURITY INFO=True;USER ID=DataConn" providerName="Oracle.ManagedDataAccess.Client"


    **NEW:**
    connectionString="DATA SOURCE=192.168.10.101:1521/dataconn;PASSWORD=password;PERSIST     SECURITY INFO=True;USER ID=DataConn" providerName="Oracle.DataAccess.Client"
James Lawruk

Here is what worked for me. My server already had an Oracle client installed. (version 11.2.0)

  • Download from the ODAC for Windows Downloads page the ODP.NET Managed Driver
    (I chose the Oct. 2015 release, 2.43 MB download)

  • Extract the zip file, grab the \lib\net40\Oracle.ManagedDataAccess.dll, and place it in the bin folder.

  • In the web.config, add a reference to the ODP.NET Managed Driver under system.data\DbProviderFactories explained in this answer.

That's it.

To confirm, run this answer's code to see if the ODP.NET provider is installed. You should see ODP.NET, Managed Driver in the list.

I actually downloaded the ODAC and install it. Then I Add a Reference and found the package roadrunner71 mentioned.

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