Oracle DB and MVC 4 showing ORA-06413 error

Asked

Viewed 161 times

1

I’m having a problem very similar to this one. To summarize, I have an application that runs with ASP.NET MVC 4, using . NET Framework 4.0, using the same DLL of access to Oracle, System.Data.OracleClient.dll Version 2.0.50727.

I realized what was suggested in the answers and the problem persists.

I tried two scenarios:

  1. When using the 64-bit IIS Express server, the system displays the error

    Ocienvcreate failed with -1 return code, but the error message text was not available

  2. When running the application using IIS Express configured to run in 32 bits it shows the error

    ORA-06413

Has anyone ever had similar error? By using the same DLL in a Winforms application the error does not occur and the system connects to Oracle without major problems.

  • By "Forms" you refer to Windows Forms?

  • Yes. This other application uses Windows Forms and I have another console application that also works with the same DLL.

2 answers

1


Possible causes:

  • Using an unsupported version of Oracle Client (older than 11.2) on Windows 7 or above.
  • As DLLs of a previous Oracle Client installation were left in the system, causing a conflict.

Solutions:

  • Install a supported version of Oracle Client.

  • Conflicting dlls resulting from previous installation of Oracle.

For the second item of the solutions do a search of "OCI.DLL" on the local machine. If you find it in any location other than your ORACLE_HOME delete it. Example of "oci.dll" outside the directory ORACLE_HOME:

inserir a descrição da imagem aqui

If necessary, try uninstalling the Oracle Client and run the search again. If you encounter something, this could be causing the error.

If the system is published on the ISS, after removing the Dlls, make the Recycle pool of your application.

  • 1

    Indeed. I decided to uninstall Oracle completely on my machine (excluding even any record of it on the system) and installing Client 11.2. After that, it worked.

0

I think I found the problem.

I was testing a project that was a console application, using the same dll as the Oracle database access to this topic problem. The file . csproj was set as below:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
 <DebugSymbols>true</DebugSymbols>
 <DebugType>full</DebugType>
 <Optimize>false</Optimize>
 <OutputPath>bin\Debug\</OutputPath>
 <DefineConstants>TRACE;DEBUG</DefineConstants>
 <ErrorReport>prompt</ErrorReport>
 <WarningLevel>4</WarningLevel>
 <PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>

However, when I went to search the file . csproj of my console application, it was as below:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
 <DebugType>pdbonly</DebugType>
 <Optimize>true</Optimize>
 <OutputPath>bin\Release\</OutputPath>
 <DefineConstants>TRACE</DefineConstants>
 <ErrorReport>prompt</ErrorReport>
 <WarningLevel>4</WarningLevel>
 <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>

The solution was to copy this section of . csproj from dll, replacing the . csproj snippet from my console application with the dll snippet. After the replacement the problem was solved. I believe that VS2015 was getting lost when saving the dlls to be used, saving one part in bin/Release folder and another in bin/Debug folder.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.