string mysql = "select region_code, 'Region ' || reg_rom " +
"as region_name from pro_lib " +
"where reg_rom is not NULL " +
"order by sort_order";
OracleCommand cmd = new OracleCommand(mysql, cn);
cmd.CommandType = CommandType.Text;
I have checked all forums and posts regarding this error. They mention that there are 2 versions of Oracle.DataAccess.Client on the server, I only have 1 version. This runs on VS2010, but when I publish the website the error above shows up. I checked my
Oracle connection from the installer and connection test passed. I tried uninstalling Oracle and reinstall, but still the same. The query above I tried changing to 'select region_code, reg_rom, ...', still the same error... please HELP ME!!!
I followed your instructions and copied the .dll file to the Bin folder. I rebuilt the website and publish it to the server. Still I get the same error. Though there are no errors running it on VS2010 or on localhost IIS (my workstation).
I tried using debug mode, and execute line per line. The problem is always on the OracleConnection line, this is before the line setting the connectionstring.
No matter what we try, we always get "The provider is not compatible with the version of Oracle client.".
The application works on 32-bit Windows XP on my workstation and on 64-bit Windows Server 2008 on a test server. But on the Windows Server 2008 R2 production machine we always get this error. We are using Oracle 11g with Oracle.DataAccess 2.111.6.20.
It looks like I'm getting the error using the 'OracleConnection'. Jgosar is right, it works on my workstation Vista 32-bit, but never on the Windows Server 2008 R2. Somehow in a 32-bit or on a Windows Server 2008 not R2 it lets the 'System.ArgumentException'
pass allowing the page to display. But on an R2 server it strictly stops the page from displaying and throws in the error.
When I execute my code in debug mode, I place a breakpoint on the line below.
OracleConnection cn = new OracleConnection(); // place breakpoint here.
I expand the popup menus and when I place the mouse cursor on OracleConnection.
Error in:
ExternalContextConnetion = 'Oracle.DataAccess.Client.OracleConnection.ExternalContextConnection' threw an exception of type 'System.ArgumentException'
There might be a bug on the Oracle driver itself.
Hope the Oracle teams see this post.
OracleConnectionWindows Server 2008 R2ProviderOracle Client
Make sure that you compile with the right library i.e. x86 with an x86 Oracle library. I had the same problem launching my application after i to compiled my app to ANYCPU while using a x86 Oracle library on an x64 machine. I set the compile to x86 ... and
pronto, the problem was resolved.
junreyes
0 Points
9 Posts
The provider is not compatible with the version of Oracle client
Sep 07, 2010 08:54 AM|LINK
I am having the error stated above. The stack trace is as follows:
Some info's:
Server: Windows Server 2008 R2
.NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Oracle.DataAccess, Version=1.102.3.0
Dev Computer: Windows Vista Business 32bit
.NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Oracle.DataAccess, Version=1.102.3.0
My Code:
OracleConnection cn;
String con1 = ConfigurationManager.ConnectionStrings["myConnectionString"].ToString();
cn = new OracleConnection();
cn.ConnectionString = con1;
cn.Open();
string mysql = "select region_code, 'Region ' || reg_rom " +
"as region_name from pro_lib " +
"where reg_rom is not NULL " +
"order by sort_order";
OracleCommand cmd = new OracleCommand(mysql, cn);
cmd.CommandType = CommandType.Text;
I have checked all forums and posts regarding this error. They mention that there are 2 versions of Oracle.DataAccess.Client on the server, I only have 1 version. This runs on VS2010, but when I publish the website the error above shows up. I checked my Oracle connection from the installer and connection test passed. I tried uninstalling Oracle and reinstall, but still the same. The query above I tried changing to 'select region_code, reg_rom, ...', still the same error... please HELP ME!!!
C# Connection Strings ConfigurationManager
Lannie
Contributor
3840 Points
749 Posts
The provider is not compatible with the version of Oracle client
Sep 08, 2010 02:23 AM|LINK
What version of Oracle are you running?
I always put my Oracle.DataAccess.dll in my project website BIN folder,
reference the DLL locally,
so it goes with my website when it moves from DEV to Production server.
Altenatively, you can use the System.Data.OracleClient provided by ASP.NET,
which works with many Oracle Clients installed on the web server.
junreyes
0 Points
9 Posts
Re: The provider is not compatible with the version of Oracle client
Sep 08, 2010 05:32 AM|LINK
I am using Oracle 10g.
I followed your instructions and copied the .dll file to the Bin folder. I rebuilt the website and publish it to the server. Still I get the same error. Though there are no errors running it on VS2010 or on localhost IIS (my workstation).
I tried using debug mode, and execute line per line. The problem is always on the OracleConnection line, this is before the line setting the connectionstring.
Please help...
OracleConnection
Lannie
Contributor
3840 Points
749 Posts
Re: The provider is not compatible with the version of Oracle client
Sep 08, 2010 05:38 PM|LINK
Need more details.
Are you running IIS with website and the database on the same server in production?
Or do you have a database server and an IIS server?
Oracle.DataAcces client for Oracle 10g 201 should be:
version 2.111.6.20
I would upgrade your ODAC components to at least that version on both dev and prod.
THere is both a client install and a database install. You will have to read the instructions from Oracle,
but it is an easy upgrade.
And
please send us your connection section from web.config (of course replace password with {password}).
jgosar
Member
12 Points
1 Post
Re: The provider is not compatible with the version of Oracle client
Sep 10, 2010 08:03 AM|LINK
We have the same problem in our company.
No matter what we try, we always get "The provider is not compatible with the version of Oracle client.".
The application works on 32-bit Windows XP on my workstation and on 64-bit Windows Server 2008 on a test server. But on the Windows Server 2008 R2 production machine we always get this error. We are using Oracle 11g with Oracle.DataAccess 2.111.6.20.
junreyes
0 Points
9 Posts
Re: The provider is not compatible with the version of Oracle client
Sep 17, 2010 12:44 AM|LINK
It looks like I'm getting the error using the 'OracleConnection'. Jgosar is right, it works on my workstation Vista 32-bit, but never on the Windows Server 2008 R2. Somehow in a 32-bit or on a Windows Server 2008 not R2 it lets the 'System.ArgumentException' pass allowing the page to display. But on an R2 server it strictly stops the page from displaying and throws in the error.
When I execute my code in debug mode, I place a breakpoint on the line below.
OracleConnection cn = new OracleConnection(); // place breakpoint here.
I expand the popup menus and when I place the mouse cursor on OracleConnection.
Error in:
ExternalContextConnetion = 'Oracle.DataAccess.Client.OracleConnection.ExternalContextConnection' threw an exception of type 'System.ArgumentException'
There might be a bug on the Oracle driver itself.
Hope the Oracle teams see this post.
OracleConnection Windows Server 2008 R2 Provider Oracle Client
Lannie
Contributor
3840 Points
749 Posts
The provider is not compatible with the version of Oracle client
Sep 17, 2010 02:43 AM|LINK
WIndows 2008 has two-way firewall.
Did you open INBOUND firewall (create rule) for your Oracle listener TCP IP:port?
The default listener is port 1521,
but of course, port can be changed on installation configuration ( a recommended security practice as well).
++++++
If IIS and Oracle DB are on the same Win2008 server,
the Windows installation guide states Oracle should be installed on a static IP using Loopback Adapter
Virtual Lan with all over network devices disabled at time of the installation.
junreyes
0 Points
9 Posts
Re: The provider is not compatible with the version of Oracle client
Oct 05, 2010 12:39 AM|LINK
Hello,
I am not familiar with INBOUND firewall on a Windows Server 2008 64-bit, how do I create a rule to let Oracle Connection thru?
Can you provide me some instructions or URL to guide me, thanks!
JunReyes
junreyes
0 Points
9 Posts
Re: The provider is not compatible with the version of Oracle client
Oct 08, 2010 09:17 AM|LINK
Here is my connection string.
<connectionStrings>
<add name="connXXXXX" connectionString="DATA SOURCE=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=172.21.1.22)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=XXXXX)));User ID={username};Password={password}" providerName="Oracle.DataAccess.Client"/>
</connectionStrings>
I really think there's no problem here. My previous post's:
When I execute my code in debug mode, I place a breakpoint on the line below.
OracleConnection cn = new OracleConnection(); // place breakpoint here.
It has not yet called the connection string. Why is it throwing a System.ArgumentException?
Please help, I may not have re-posted earlier but please Help Me!!!
jssting
Member
8 Points
4 Posts
Re: The provider is not compatible with the version of Oracle client
Oct 08, 2010 12:24 PM|LINK
Hi junreyes,
Make sure that you compile with the right library i.e. x86 with an x86 Oracle library. I had the same problem launching my application after i to compiled my app to ANYCPU while using a x86 Oracle library on an x64 machine. I set the compile to x86 ... and pronto, the problem was resolved.
Regard
Jacques