My workstation is an x86 so I am using the 32-bit. The OracleConnection throws the error but my local IIS continues displaying the page bypassing the thrown exception. And if I throw the webpage on the server, it quits the page due to the said System.ArgumentException.
This is really driving me Nuts.
Hope you have other suggestions.
Have you any luck jgosar? If you tried other means, I'd like to try them if its ok with you...
If your server is running on windows x64, I still suggest forcing your compiler to x86 mode as the version of the Oracle dll is most probably x86 and as the connection initialization takes place on the server side, and it will cause the listed error. The
only time i've gotten this type of error with Oracle connections has been when I was compiling to the wrong cpu type.
I am still on my workstation which is a 32bit x86 machine, naturally when I compile it is an x86 web application. On my IIS workstation the error is captured only in debug mode but the web continues and displays.
So you mean I need to compile the application to x64 to be able to run it on the Windows x64 server. My Configuration Manager only displays Any CPU, it does not have x86 nor x64. How do I get or set to x86 or x64?
It looks like you're running this in .NET 4. Sorry if this is offbase, but starting with .NET 4, Microsoft doesn't include their Oracle provider with Visual Studio. Could there be some sort of conflict with that? With .NET 4, you have to install Oracle's
Visual Studio developer tools (ODT) in order to get the native .NET 4 OracleClient classes. Are you able to get that installed on the Oracle server?
Naturally if you are using a x86 machine, with an x86 dll you will not have any issues. So I suggest that you look at getting the x64 version of the Oracle.DataAccess.dll library for running the interface on your web server, just add that library as a reference,
and that should resolve your issues when running the web app on your server, but it does mean that you may have to swap between libraries when diagnosing problems on your local IIS instance on you desktop. I just checked and unfortunately, in a web application
it seems you cannot set the x86 or x64 setting. I am including a link to the Oracle x64 client that has the x64 version of the Oracle.DataAccess.dll.
I unistalled and reinstalled VS2010 and Oracle Client 11g. It is now working on my workstation and local IIS. When I publish the web application to the 64bit server, I get a new error "Could not load file or assembly 'Oracle.DataAccess' or one of its
dependencies. An attempt was made to load a program with an incorrect format."
Base on another forum, I just:
Open Server Manager
Open IIS snap-in
Click on “application Pools”
From the list pane click ASP.NET v4.0 or the application pool used by your site
In the right-hand pane click “Advanced Settings…”
In the window Advanced Settings, set “Enable 32-bit Applications” to True
Click “OK”
Thanks to all who answered and helped me.
More POWER to you all.
JunReyes
Marked as answer by junreyes on Oct 19, 2010 06:30 AM
1. Check the OracleClient that you are referencing in Visual Studio, this should match the one you are to reference in your server.
2. You can also place the Oracle.DataAccess.dll in the bin folder of your application and reference it there. When you publish the page if would be carried to the server. Still you will need to install OracleClient on your target server.
3. The error "The provider is not compatible with the version of Oracle client" should not worry you. Try to check the version of the OracleClient in your GAC. It should match the one you referenced and is similar in version set in your web.config.
Your GAC is located in C:\Windows\Microsoft.NET, for 32bit there should be a GAC_32 and for 64bit there should be a GAC_64. Again the version of OracleClient should be similar set in your web.config.
If you are in a 64bit server, follow this settings: (OracleClient runs as a 32bit)
Open Server Manager
Open IIS snap-in
Click on “application Pools”
From the list pane click ASP.NET v4.0 or the application pool used by your site
In the right-hand pane click “Advanced Settings…”
In the window Advanced Settings, set “Enable 32-bit Applications” to True
Click “OK"
I have learned a lot from the fellows who helped me. Hope this tip would help others in similar situation.
All runs fine on my PC. I have VS2010 with Oracle client 11r2 installed (32 bit). Supposedly the same client was installed on the web server 3 years ago (11r1). Oracle.DataAccess.dll is version 4.112.2.0.
junreyes
0 Points
9 Posts
Re: The provider is not compatible with the version of Oracle client
Oct 11, 2010 08:30 AM|LINK
Jacques,
My workstation is an x86 so I am using the 32-bit. The OracleConnection throws the error but my local IIS continues displaying the page bypassing the thrown exception. And if I throw the webpage on the server, it quits the page due to the said System.ArgumentException.
This is really driving me Nuts.
Hope you have other suggestions.
Have you any luck jgosar? If you tried other means, I'd like to try them if its ok with you...
Thanks,
JunReyes
jssting
Member
8 Points
4 Posts
Re: The provider is not compatible with the version of Oracle client
Oct 11, 2010 09:36 AM|LINK
If your server is running on windows x64, I still suggest forcing your compiler to x86 mode as the version of the Oracle dll is most probably x86 and as the connection initialization takes place on the server side, and it will cause the listed error. The only time i've gotten this type of error with Oracle connections has been when I was compiling to the wrong cpu type.
junreyes
0 Points
9 Posts
Re: The provider is not compatible with the version of Oracle client
Oct 12, 2010 04:31 AM|LINK
I am still on my workstation which is a 32bit x86 machine, naturally when I compile it is an x86 web application. On my IIS workstation the error is captured only in debug mode but the web continues and displays.
So you mean I need to compile the application to x64 to be able to run it on the Windows x64 server. My Configuration Manager only displays Any CPU, it does not have x86 nor x64. How do I get or set to x86 or x64?
Kindly be patient on me.
Thanks!
JunReyes
user-hostile
Member
5 Points
7 Posts
Re: The provider is not compatible with the version of Oracle client
Oct 14, 2010 02:40 AM|LINK
It looks like you're running this in .NET 4. Sorry if this is offbase, but starting with .NET 4, Microsoft doesn't include their Oracle provider with Visual Studio. Could there be some sort of conflict with that? With .NET 4, you have to install Oracle's Visual Studio developer tools (ODT) in order to get the native .NET 4 OracleClient classes. Are you able to get that installed on the Oracle server?
U-H
jssting
Member
8 Points
4 Posts
Re: The provider is not compatible with the version of Oracle client
Oct 15, 2010 05:08 AM|LINK
HI Junreyes,
Naturally if you are using a x86 machine, with an x86 dll you will not have any issues. So I suggest that you look at getting the x64 version of the Oracle.DataAccess.dll library for running the interface on your web server, just add that library as a reference, and that should resolve your issues when running the web app on your server, but it does mean that you may have to swap between libraries when diagnosing problems on your local IIS instance on you desktop. I just checked and unfortunately, in a web application it seems you cannot set the x86 or x64 setting. I am including a link to the Oracle x64 client that has the x64 version of the Oracle.DataAccess.dll.
Here is the link :
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/111070-win64-2008soft-084715.html
junreyes
0 Points
9 Posts
Re: The provider is not compatible with the version of Oracle client
Oct 19, 2010 06:28 AM|LINK
Hello,
I unistalled and reinstalled VS2010 and Oracle Client 11g. It is now working on my workstation and local IIS. When I publish the web application to the 64bit server, I get a new error "Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Base on another forum, I just:
Open Server Manager
Open IIS snap-in
Click on “application Pools”
From the list pane click ASP.NET v4.0 or the application pool used by your site
In the right-hand pane click “Advanced Settings…”
In the window Advanced Settings, set “Enable 32-bit Applications” to True
Click “OK”
Thanks to all who answered and helped me.
More POWER to you all.
JunReyes
jssting
Member
8 Points
4 Posts
Re: The provider is not compatible with the version of Oracle client
Oct 20, 2010 02:42 PM|LINK
Glad we could be of assistance....
junreyes
0 Points
9 Posts
Re: The provider is not compatible with the version of Oracle client
Oct 21, 2010 12:15 AM|LINK
Yes, thanks a million...
Note and Tips for others:
1. Check the OracleClient that you are referencing in Visual Studio, this should match the one you are to reference in your server.
2. You can also place the Oracle.DataAccess.dll in the bin folder of your application and reference it there. When you publish the page if would be carried to the server. Still you will need to install OracleClient on your target server.
3. The error "The provider is not compatible with the version of Oracle client" should not worry you. Try to check the version of the OracleClient in your GAC. It should match the one you referenced and is similar in version set in your web.config.
Your GAC is located in C:\Windows\Microsoft.NET, for 32bit there should be a GAC_32 and for 64bit there should be a GAC_64. Again the version of OracleClient should be similar set in your web.config.
If you are in a 64bit server, follow this settings: (OracleClient runs as a 32bit)
Open Server Manager
Open IIS snap-in
Click on “application Pools”
From the list pane click ASP.NET v4.0 or the application pool used by your site
In the right-hand pane click “Advanced Settings…”
In the window Advanced Settings, set “Enable 32-bit Applications” to True
Click “OK"
I have learned a lot from the fellows who helped me. Hope this tip would help others in similar situation.
JunReyes :)
oracle OracleConnection Oracle Client Compatible Assembly
gearyglov
Member
2 Points
2 Posts
Re: The provider is not compatible with the version of Oracle client
Aug 24, 2011 03:30 PM|LINK
I am experiencing this same problem. Please help.
All runs fine on my PC. I have VS2010 with Oracle client 11r2 installed (32 bit). Supposedly the same client was installed on the web server 3 years ago (11r1). Oracle.DataAccess.dll is version 4.112.2.0.
mkonanki
Contributor
2820 Points
624 Posts
Re: The provider is not compatible with the version of Oracle client
Mar 21, 2012 01:58 PM|LINK
Download below Zip file and install it will work
http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
ODTwithODAC112030.zip
ConfigurationManager