Error: Unable to find the requested. Net Framework Data Provider. may not be installed.

Source: Internet
Author: User

Today in helping colleagues debug when encountered this problem, the error message to the data provider is the problem, first we look at the environment.

Database version: Oracle 11.2.0.4.0 64-bit

Database server: Linux

Application Server: 32-bit Windows

Iis:iis7

. netframework:4.0

Guess that there is no data Provider installed for the version of the. Net framework, see the node under Web. config:

<system.data>   <DbProviderFactories>   </DbProviderFactories></system.data>

Did not find here configured Dataprovider.

We go to the corresponding version of the. NETFramework installation directory Machine.config go down and find this node.

My installation directory is:

There is also no dataprovider configuration found.

So far, we can be sure that config is missing from configuration, and now we're going to do it. NETFramework add the corresponding version of data Provider provided by Oracle.

Two. Check to see if there is a corresponding data Provider

First, identify the data Provider that we have on our system, because the database I use is Oracle, so my data Provider is provided by Oracle and can be found in Oracle's installation directory:

The odp.net in the directory is Oracle Data Provider for. NET's abbreviation.

2.x is. Netframwork version 2.0 of the data Provider (until. NetFramework4 below,. NetFramwork3.0 and. NetFramwork3.5 just add a different component, but the kernel is 2.0)

4 is. Netframwork 2.0 version of Data Provider

They are served through Oracle.DataAccess.dll. We can view the odp.net version of the installation by using the GACUTIL.EXE/L oracle.dataaccess command under the Vs.net named Rows window.

Shows that I have installed two versions of Oracle Data Provider.

You can also view the features of the Oracle.DataAccess.dll assembly version, processor platform, and so on in the C:\Windows\assembly directory. But there is a problem, My machine does not find the 4.0 version of the Oracle.DataAccess.dll installation information.

However, the production environment can be found as follows:

The version of the assembly is 10.2.0.100.

Three. Installation of Oracle Data provider

If you don't have a corresponding odp.net, you need to install it yourself, how do you know which version of odp.net you need?

Here are two principles

1..Net applications are consistent with the Odp.net processor type, such as: IIS's application pool is 64-bit, then the odp.net version is 64-bit;

The version of the. NETFramework and odp.net versions of the 2..Net application should also be consistent.

(commanding): http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html

64-bit odp.net:http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html

32-bit odp.net:http://www.oracle.com/technetwork/database/windows/downloads/utilsoft-087491.html

Note that the download is consistent with your database version.

Take Ann 64 Odp.net as an example:

1.When the download is complete, unzip it to a directory, such as the D:\oracle11g\odp.net,cmd type command:
D:\oracle11g\odp.net\x64>install.bat all c:\odp.net myhome (Install all)
The above command will automatically copy all files to C:\odp.net 2.Then go to c:\odp.net and type the command:
C:\odp.net>configure.bat All MyHome (Configure all component) will automatically deploy the appropriate assemblies to the GAC.

Four. Configuration of Oracle Data provider

After installation, you can do so in the corresponding. NETFramework version under View machine.config inside the <system.data><DbProviderFactories> node, if not, you can add under this node.
<add name= "Oracle data Provider for. NET" invariant= "Oracle.DataAccess.Client" description= "Oracle data Provider for. NET "Type=" Oracle.DataAccess.Client.OracleClientFactory, Oracle.dataaccess, version=4.112.3.0, Culture=neutral, publickeytoken=89b483f429c47342 "/>

The version information should be the same as the one you installed earlier.

You can also add the above information in the <system.data><DbProviderFactories> node under Webconfig under your application. It is recommended to add it in machine so that the corresponding version is used. The application under NETFramework does not have to be configured separately for one by one.

Five. Using an assembly provided with Oracle Data Provider

Now you can open your VS, add the assembly Oracle.DataAccess.dll provided by Oracle Data Provider (odp.net). Now, You can use this Oracle-provided DLL to access the Oracle database. The problem is also solved. Other different types of databases can be solved according to this idea. Original address: http://www.cnblogs.com/gudi/p/6110875.html

Error: Unable to find the requested. Net Framework Data Provider. may not be installed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.