I made a .NET(4.6.1) application that connects to an Oracle9i Database. This application works fine on the machine I wrote the application on but not on the machine where the application needs to be installed on.
I'm using System.Data.OracleClient. I have no idea what could be wrong. I checked the following things.
- Both machines run the same oracle client with the same TNS names configuration. This configuration is copied from the development machine where it is working.
- Both machines call for the correct tnsnames.ora file (Validated using procmon).
- Both machines can connect with SQLPlus just fine.
- Both machines are tested with the same active directory account.
- Both machines have the correct username and password setup for the connection.
- I tried fresh install of the oracle client without success.
- The application is running in 32 mode on both machines.
- Both machines run the same version of Windows 7
Anyone know what else could be the cause of this problem?
Stacktrace of the error:
2017-10-05 16:40:48.7203 - ERROR: System.Data.OracleClient.OracleException (0x80131938): ORA-12154: TNS:servicenaam kon niet worden herleid.
bij System.Data.OracleClient.OracleException.Check(OciErrorHandle errorHandle, Int32 rc)
bij System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
bij System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions)
bij System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
bij System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
bij System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
bij System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
bij System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
bij System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
bij System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
bij System.Data.OracleClient.OracleConnection.Open()
bij QardPrint.Model.Locus.LocusFunctions.AddEmployee(Employee employee, String& errMsg)