Access informix using C# inside docker container

我怕爱的太早我们不能终老 提交于 2019-12-08 02:15:21

问题


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 
pushDownStrAppended)
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?

来源:https://stackoverflow.com/questions/55302931/access-informix-using-c-sharp-inside-docker-container

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!