2

this question can look like a clone of others, but I can't find a correct answer to this one. This is my scenario: I have a C# software called by webservices that need to write to an oracle database. In my test server no problems, it works like a charm, but, in another equal server it gives to me this error:

Oracle.DataAccess.Client.OracleException at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Int32 isRecoverable) at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src) at Oracle.DataAccess.Client.OracleConnection.Open()

With no other messages. I thought that it is an error installing oracle client, but, another small application that I wrote to test oracle connection works:

var connectionString = ConfigurationManager.AppSettings["connectionString"];
using (OracleConnection nwindConn = new OracleConnection(connectionString))
{
   nwindConn.Open();
   Console.WriteLine("opened");
}

ConnectionString:

Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=thisdatabase.thisinstance)(PORT=1521))(LOAD_BALANCE=yes)(FAILOVER=on)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=serv)(FAILOVER_MODE=(TYPE=SESSION)(METHOD=BASIC)(RETRIES=180)(DELAY=5))));User ID=myuser;Password=mypsw;

So, the problem, I think is in the application configuration, but why the same works on other server? I tried to edit Project and Solution debug platform Configuration but the problem still exists.. Any suggestions?

6
  • I suggest to post the connectionstring. Feel free to remove security data.... Commented Mar 12, 2014 at 13:22
  • Opening a connection and writing to are different animals. Expand your test project to insert some data and see if you get the same error. Commented Mar 12, 2014 at 13:22
  • @paqogomez: but the error is on connection open, so I need to solve this problem first.. Commented Mar 12, 2014 at 13:23
  • Are you connecting to the same oracle database instance from different machines or is it two different oracle servers. Using your connection string can you use something like Oracles SQL Plus to connect? Commented Mar 12, 2014 at 13:23
  • @Steve: I added connection string. Commented Mar 12, 2014 at 13:26

2 Answers 2

1

the problem was the IIS user with application was started, "Application pass-trough". I changed it with my administrator user and it works like a charm. Thank you anyway.

Sign up to request clarification or add additional context in comments.

2 Comments

Would you please elaborate what you mean by "Application pass-through"? I'm having a similar problem and I think I do not have permission to access my oracle client app.
@max Hi, go to your application in IIS, select settings, "connect as" change your user!
0

in the case of using 11g just go to your oracle folder ( mine C:\oracle) and look for the files Oracle.dataAccess.dll you may find 4 files copy them in the BIN of the application and it will all be fine.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.