Last post Apr 16, 2018 08:15 AM by rvpundlik.007
Apr 12, 2018 12:30 PM|rvpundlik.007|LINK
I have ASP.net web application which is connecting to IBM DB2 Database. When I publish my application and deploy it on server it works fine. but if I restart IIS it starts giving me below error while connecting to database. If I publish the code and deploy
in on server then again it starts working for some time and then giving me same error again.
Error Message:- Unable to load DLL 'db2app64.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
at IBM.Data.DB2.UnsafeNativeMethods.DB232.SQLFreeConnAttribsADONET(DB2SQLGetConnAttribsADONETParams& pParam)
at IBM.Data.DB2.ConnSettingsFromXmlConfig.Dispose(Boolean disposing)
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 Allstate.Framework.Internal.Data.DataSource.CreateCommand(String commandText, CommandType commandType)
at AICS.ARCHITECTURE.SERVICES.DATA.Utility.CreateNewDbCommand(IDataSource dataSource, IDbTransaction tran, IDbConnection conn, DbCommandParameters parms, IDbConnection& saveConnection)
at AICS.ARCHITECTURE.SERVICES.DATA.DataProcessing.PAFrameworkLoadDataSet(cdtMSG tMsg, IDataSource objDataSource, SelectQueryParameters parms, String& sSQLMessage, ArrayList arlParms, IDbTransaction& objDbTransaction)
at AICS.ARCHITECTURE.SERVICES.DATA.DataProcessing.PAFrameworkLoadDataSetWithRetry(cdtMSG tMsg, SelectQueryParameters parms)
at AICS.ARCHITECTURE.SERVICES.DATA.DataProcessing.ExecuteSelectQueryAsDataSet(cdtMSG tMsg, SelectQueryParameters parms)
at Allstate.Companion.DataAbstraction.NewJerseyFormsDataAccess.FormsDA.MIFillReimbursementClaimNumberListBox(Int32 bilingCycleID, String strCycThreshDt)
Apr 13, 2018 02:43 AM|Brando ZWZ|LINK
As far as I know, the “initialization routine failed.” problem generally occurs because some dll that this dll referenced was not found or something in the init method failed.
The problem is that option B could really mean anything, such as the init routine making calls that require permissions that you don’t have, or for example that it interacts with the desktop which is not permitted from a service etc.
The most common issue though is that the component was not properly installed, so that some of its dependencies are not available.
I suggest you could firstly check the web application's bin folder has the db2app64.dll file.
Besides, I suggest you could check your IIS application pool have the permission to access the db2app64.dll file.
Apr 16, 2018 08:15 AM|rvpundlik.007|LINK
Thanks Brando for your help, actually I did some more trouble shooting and if I run the Console application on my server then it is working fine, but if I run any asp.net application then it giving me this error.
I don't have the db2app64.dll file in my Bin folder and also app pool is running user id who is administrator for the server. now it is showing me an error as
Unable to load DLL 'db2app64.dll': The specified module could not be found