I have a Desktop application that creates ASP.NET pages based on the settings in the application. This application can create connections on the fly through the Oracle Client and display the data. Now, when we deploy the resulting page to IIS, if the server has the Oracle client installed, it normally works as expected and retrieves the data. I have a new server installed where I set up the Oracle Client 11g, gave the user running the application pool in IIS (NetServices) full access to the Oracle_Home directory, I also checked the registry to make sure all was there and it seems to be. I did notice that we were missing the ODP.NET 4.0 (we are running .NET Framework 4) and I installed it... and still get the same error:
System.Exception: System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions)
at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
At this point, I don't know what else to do... Any ideas, or suggestions would be appreciated.
Edited by: lgarcia on Mar 20, 2012 3:24 PM
Did you reboot after installing the client? System.Data.OracleClient relies on your PATH environment variable to locate the Oracle software, and changes to PATH only get picked up when IIS is first started.
Also open a up a dos prompt and type PATH to confirm that the OracleHome\bin is in your PATH environment variable.
Did you install 32 bit or 64 bit Oracle client? Is the app running as 32 bit or 64 bit?
Thanks for your response! Yes, I did reboot the box itself. I also restarted IIS several times. I did check the PATH variable and yes, I can see the ORACLE_HOME path there. The application is running in a 64 bit machine and it is running as such as well. As far as the oracle client, I am not sure, the reason being that I don't do the installs; I need to request those to the infrastructure group in the company where I work. So, in a way I rely on that. I did request the oracle client install to be for 64 bit; but not sure how to confirm that. If there is a way, please, let me know.
Again, thanks for your response.
You'll need to double check whether the app as running as 32 bit or 64 bit. An easy way to do that is open task manager, hit the Process tab, and look for the process name. A 32 bit process on a 64 bit OS will have *32 next to it's name (for example, firefox.exe*32). If it's a 32 bit process, you'll need 32 bit client.
The easiest way to check the Oracle install is in the registry.
If you have an Oracle hive under HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE, it's 64 bit.
If you have an Oracle hive under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Oracle , it's 32 bit.
That's the Microsoft provider and it does not support Net 4.x, afaik. Installing ODP is not of much use if app is built with a different provider.
Also as said above, verify if app runs as a 32-bit or 64-bit process.
I think this client is not well installed. I open SQLPlus and immediately it asks me for my password just as if I was already connected to a database... which is not the case. Normally it should ask me for the server and so on, correct? So there is something there not working correctly.
I'm retaking this thread as I have not been able to solve this problem and was away for a while. The client is now installed correctly. I had a doubt before as I was getting the user name prompt which is right. It was just a bad interpretation on my side. But I enter the database user name, and password and I'm in any database I want to hit. I also tried opening a database from an application that uses OracleClient data provider (which needs the client installed) and it works as well. I checked if it is 32 bit or 64 bit and it is 64 according with the previous reply and where it would show in the registry. So I think I can speculate it was installed correctly in the box. I gave the ORACLE_HOME folder permission to "Authenticated Users" to Read & Execute, Read, and List Folder Contents. Rebooted the IIS server and still the same error... Very frustrating...