Access informix using C# inside docker container


I am working on migrating a NET application that accesses an Informix database so that it can run in a Docker container. I have done a POC and when I run it on my local machine it works correctly. But when I want to run the same application inside a container, an exception is thrown:

Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'db2app.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   at IBM.Data.DB2.UnsafeNativeMethods.DB232.SQLFreeConnAttribsADONET(DB2SQLGetConnAttribsADONETParams& pParam)
   at IBM.Data.DB2.ConnSettingsFromXmlConfig.Dispose(Boolean disposing)
   at IBM.Data.DB2.ConnSettingsFromXmlConfig.Dispose()
   at IBM.Data.DB2.DB2ConnPool.ReplaceConnectionStringParms(DB2Connection 
connection, String szValue, DB2ConnSettings& pSettings, 
DB2ConnSettingsInternal& pSettingsInternal, Boolean bAttach, Boolean 
at IBM.Data.DB2.DB2Connection.set_ConnectionString(String value)
at IBM.Data.DB2.DB2Connection..ctor(String connectionString)
at ConsoleInformix.Program.Main(String[] args) in 

The container is based on the image: microsoft/aspnet:4.7.2-windowsservercore-1803

The main application to migrate is a Web API project (.NET Framework 4.7.2)

Examining NuGet packages for IBM.DataDB2 warns: "NOTICE - This package requires the IBM DB2 client software to be installed locally and available on your %PATH% environment variable"

But I have not managed to solve how to perform unattended or silent installation of the IBM client in the container. Can anybody help?

asked on Stack Overflow Mar 22, 2019 by jdelm

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0