I am migrating a full framework application to .NET Core. Under the full framework, it used the following connection string with the IBM .NET Connector for DB2:
"Server=localhost:50000;Database=testdb;"
The code then assigned UserID
and Password
properties from credentials vault.
Now, under Core, with the IBM .NET Core connector for DB2 specifically v.2.0.0.100 (long-term support, according to IBM), this connection string throws an exception when a connection string builder is created from it:
{System.ArgumentNullException: Value cannot be null. at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken) at IBM.Data.DB2.Core.DB2ConnPool.ReplaceConnStrPwd(String value, String newvalue, Boolean onlyPwd) at IBM.Data.DB2.Core.DB2Connection.RemoveConnectionStringPassword(String value, Boolean bMask) at IBM.Data.DB2.Core.DB2ConnectionStringBuilder..ctor(String connectionString)
There is no InnerException
. I presume that some mandatory parameters of the connection string that I am not aware of have to be populated under Core, whereas under full framework they were optional. A careful read of IBM documents on DB2 connector Core yielded no mentions of connection string changes, unless I missed them. This blog post mentioned no such breaking changes.
Is anyone aware of mandatory connection string parameters that are missing from my connection string specifically for .NET Core connector?