0

I have a fresh new Windows Server 2012r2 box. I have a tiny console .NET app that includes the native Oracle client dlls and tries to connect to an Oracle db and just execute a simple query. I have 4 other servers that can complete this test. This new machine cannot.

System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleClientFactory' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'OraOps12.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I tried to enable IIS on the server. no luck. I confirm the db is pingable from this server.

Not sure what else i can try or how else i can compare the machines that do work. None of these machines has ANY Obstacle software on them.

What else can i try?

6
  • Looks like some Oracle components are not installed Jan 4, 2017 at 16:05
  • NO oracle components are installed. that's kind of the point.
    – VBAHole
    Jan 4, 2017 at 16:08
  • Is the Oracle client the same architecture (32 bit vs. 64 bit) as your IIS? Jan 4, 2017 at 16:20
  • yes. all 64-bit
    – VBAHole
    Jan 4, 2017 at 16:26
  • Do find mentioned dll on your server? Is this folder included in PATH variable? Jan 4, 2017 at 16:28

1 Answer 1

1

OraOps12.dll has a reference to the Visual C++ runtime (e.g. version 12.1 has a reference to the Visual C++ runtime 2013). When this runtime has not been installed on your server, the DLL cannot be loaded, and ODP.NET throws this exception.

A tool like Dependency Walker shows you to find missing DLL references and has saved me a lot of time to find missing dependencies on a new server.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.