문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top