I have a dll
that is responsible for performing queries in the database. In this dll
, in the connection class, I have a method that opens the connection to the database and returns the connection, as seen below:
private OracleConnection _IniciarConexao()
{
///Limpa as variáveis de erro
this.UltimaExcecao = null;
this.Erros = new List<Exception>();
OracleConnection conexao = null;
try
{
conexao = new OracleConnection("Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=***)(PORT=***)))(CONNECT_DATA=(SERVICE_NAME=****)(SERVER = DEDICATED))); User Id=***; Password=***;");
conexao.Open();
}
catch (Exception ex)
{
this.UltimaExcecao = ex;
this.Erros.Add(ex);
}
return conexao;
}
The dll
used for Oracle references is System.Data.OracleClient.dll Versão 2.0.50727
.
This dll
is consumed by a Web application using MVC 4
with C#
and .Net Framework 4.0
.
When I use this dll
in a Windows Forms
project I get connection to the database without problems, however when I use a MVC
or WebForms
system, a connection error with the database occurs.
The error that occurs is ORA-06413
. The image below can illustrate what happened:
I'm already on the second day of unsuccessful research on how to solve this problem.
When publishing the system to the production server, it is able to connect normally, but in place, to use debug mode, I can not connect to the database.
Does anyone know how to fix this error, or some source that can tell me to solve this problem?