Oracle DB and MVC 4 with error ORA-06413

1

I'm having a problem very similar to this here . In short, I have an application that runs with ASP.NET MVC 4, using the .NET Framework 4.0, using the same Oracle access DLL, the System.Data.OracleClient.dll Version 2.0.50727.

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

I tested two scenarios:

  • When using the 64-bit configured IIS Express server, the system displays the error

      

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

  • When running the application using IIS Express configured to run at 32 bits, it will display the error

      

    ORA-06413

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

        
    asked by anonymous 22.05.2017 / 20:28

    2 answers

    1

    Possible causes:

    • Use an unsupported version of Oracle Client (older than 11.2) in Windows 7 or higher than this version.
    • The DLLs of a previous Oracle Client installation was left on the system, causing a conflict.

    Solutions:

    • Install a supported version of Oracle Client.

    • Conflicting DLLs resulting from previous Oracle installation.

    For the second item of the solutions, search for "OCI.DLL" on the local machine. If you find it anywhere other than your% with% exclude it. Example of "oci.dll" outside the ORACLE_HOME directory:

    If necessary, try uninstalling the Oracle Client and run the search again. If you find anything, this may be causing the error.

    If the system is published to the ISS, after removing the DLLs, recycle your application.

        
    24.05.2017 / 02:18
    0

    I think I found the problem.

    I was testing a project that was a console application, using the same Oracle database access dll as the problem in this topic. The .csproj file was set up 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 .csproj file for my console application, it looked like this:

    <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 the .csproj from the 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 it saved the dlls to be used, saving one part in the bin / Release folder and another in the bin / Debug folder.

        
    05.12.2017 / 18:23