"Invalid service name" and "Can not load oci.dll" troubles
Posted: Mon 26 Sep 2011 11:26
We are trying to connect our application to an Oracle database:
1. When trying to connect using direct mode with the correct host and service name, we got an "Invalid service name" error message. We created a tiny console application to verify that. The connection string looked like this:
As a workaround we installed an instantclient and tried the following indirect connection, which worked:
2. Since the indirect connection worked in the console application we then used this as the connection string in our web.config. The web application though failed to connect:
Somewhere on the forum I read that the reason could be a limited trust level. But I tried using , and it still did not work.
I also added a test aspx page which executes the following code, and the page was successful.
It printed: C:\oracle\product\11.2.0\client_1\oci.dll InternalName: OriginalFilename: Oci.dll FileVersion: 11.2.0.1.0 Production FileDescription: Oracle Call Interface Product: ProductVersion: Debug: False Patched: False PreRelease: False PrivateBuild: False SpecialBuild: False Language: English (United States)
If you can help me solve this, I will be glad. I will be even more happy if I could resolve the first of these issues, such as not to need the instant client at all.
Thanks,
chiccodoro
1. When trying to connect using direct mode with the correct host and service name, we got an "Invalid service name" error message. We created a tiny console application to verify that. The connection string looked like this:
Code: Select all
User Id=theuser;Password=thepassword;Server=the.fqdn.of.the.host;Direct=True;Service name=theservicename
Code: Select all
User Id=theuser;Password=thepassword;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=the.fqdn.of.the.host)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=theservicename)));Direct=False
Code: Select all
Can not load Oracle client library oci.dll from home . at Devart.Data.Oracle.OracleHome.get_ClientVersion()
at Devart.Data.Oracle.aw.a(Boolean A_0, Boolean A_1, OracleHome A_2, Boolean A_3)
at Devart.Data.Oracle.OracleInternalConnection..ctor(aa connectionOptions, OracleInternalConnection proxyConnection)
at Devart.Data.Oracle.cs.a(l A_0, Object A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, l A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
at Devart.Common.DbConnectionFactory.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.Oracle.OracleConnection.Open()
at Devart.Common.Entity.b7.a(DbConnection A_0)
at Devart.Data.Oracle.Entity.j.a(OracleConnection A_0, Boolean A_1)
at Devart.Data.Oracle.Entity.OracleEntityProviderServices.GetDbProviderManifestToken(DbConnection connection)
at System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
I also added a test aspx page which executes the following code, and the page was successful.
Code: Select all
If you can help me solve this, I will be glad. I will be even more happy if I could resolve the first of these issues, such as not to need the instant client at all.
Thanks,
chiccodoro