I'm getting the following error when opening a connection DB2Connection. I'm using IBM.Data.DB2.Core 3.1.0.400 in a netcoreapp3.1 web app in Azure. We finally figured out how to tunnel connections from a web app in Azure to an on-prem iSeries AS/400 server. Now I'm getting this. It works on my machine
™, but not in Azure. I confirmed the web app is running in x64 and all projects are built in x64. Is this a networking issue?
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at IBM.Data.DB2.Core.UnsafeNativeMethods+DB232.SQLConnectADONET(IntPtr, IntPtr ByRef, IBM.Data.DB2.Core.DB2NmpSetiInfo*, IntPtr ByRef, IBM.Data.DB2.Core.DB2SQLConnectADONETParams ByRef)
at IBM.Data.DB2.Core.UnsafeNativeMethods+DB232.SQLConnectADONET(IntPtr, IntPtr ByRef, IBM.Data.DB2.Core.DB2NmpSetiInfo*, IntPtr ByRef, IBM.Data.DB2.Core.DB2SQLConnectADONETParams ByRef)
at IBM.Data.DB2.Core.DB2ConnPool+DB2ConnWrapper.Open(System.String, System.Data.IsolationLevel, IBM.Data.DB2.Core.DB2Connection, Int32 ByRef, Int32 ByRef)
at IBM.Data.DB2.Core.DB2ConnPool.Open(IBM.Data.DB2.Core.DB2Connection, System.String ByRef, DB2ConnSettings ByRef, System.Object ByRef)
at IBM.Data.DB2.Core.DB2Connection.Open()
at System.Data.Common.DbConnection.OpenAsync(System.Threading.CancellationToken)
at Dapper.SqlMapper.TryOpenAsync(System.Data.IDbConnection, System.Threading.CancellationToken)
at Dapper.SqlMapper+<QueryAsync>d__33`1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Dapper.SqlMapper+<QueryAsync>d__33`1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]](<QueryAsync>d__33`1<System.__Canon> ByRef)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[Dapper.SqlMapper+<QueryAsync>d__33`1[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], Dapper, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null]](<QueryAsync>d__33`1<System.__Canon> ByRef)
at Dapper.SqlMapper.QueryAsync[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Data.IDbConnection, System.Type, Dapper.CommandDefinition)
at Dapper.SqlMapper.QueryAsync[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Data.IDbConnection, System.String, System.Object, System.Data.IDbTransaction, System.Nullable`1<Int32>, System.Nullable`1<System.Data.CommandType>)
------------------------------
John Rummell
------------------------------
#DataManagementGlobal#DataServerDrivers