I have a .NET Windows Service program developed in .NET 4. My program works well on my development environment. However when I deploy the program with the IBM.Data.DB2.iSeries.dll on the Production server I get the below error. I should also mentioned that the PROD environment has the Client Access installed and is registered in GAC with version 10.0.0.0 while the IBM dll I copied to my program is version 126.96.36.199. I am not sure why my program is not connecting to the AS400 database since it is referencing the IBM dll in my deployed application folder. The error I received is:-
iDB2InvalidConnectionStringException.Message: The ConnectionString property is invalid.
iDB2InvalidConnectionStringException.InnerException.Message: The type initializer for 'IBM.Data.DB2.iSeries.iDB2Constants' threw an exception.
iDB2InvalidConnectionStringException.StackTrace + Source + InnerException.StackTrace: at IBM.Data.DB2.iSeries.iDB2Connection..ctor(String connectionString)
at Danieli_Windows_Service.DanieliLibrary.Common.DB..ctor(String db_type) in C:\L3DataL2Migration\DataMigration\Danieli_Windows_Service\DanieliLibrary\Common\DB.cs:line 41.
IBM.Data.DB2.iSeries. at IBM.Data.DB2.iSeries.iDB2ConnectionStringBuilder.set_Item(String keyword, Object value)
at IBM.Data.DB2.iSeries.iDB2ConnectionStringBuilder.ParseConnectionString(String& propString, String& propertyInError, Exception& innerException)
Does anyone have a solution?
This topic has been locked.
1 reply Latest Post - 2012-10-24T21:23:44Z by ldubois
Pinned topic .NET Windows Service program on PROD not accessing IBM.DB2 database
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-10-24T21:23:44Z at 2012-10-24T21:23:44Z by ldubois
ldubois 11000095J1122 PostsACCEPTED ANSWER
Re: .NET Windows Service program on PROD not accessing IBM.DB2 database2012-10-24T21:23:44Z in response to SystemAdminThe .NET provider is not a standalone component. It must be installed as part of the IBM i Access for Windows product, because it depends upon other parts of the product for things like communications, security, translations, etc. You will need to install IBM i Access for Windows onto your production server. You can select a custom install and deselect the pieces you don't need.