We are using the channel definition file to get the hostname and channel based on queue manager name.
But sometimes we are seeing the below error, is there any solution for this.
This is maybe due to multiple threads trying to access at the same time?
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationExceptionat System.Runtime.InteropServices.Marshal.PtrToStructureHelper(IntPtr, System.Object, Boolean)
Details:
What kind of CCDT file is it? Binary or JSON? -Binary
Is your .NET application running in managed or non-managed mode? -Managed
What version of the MQ Client software are you using? -9.2.0.6
What release of MQ created the CCDT file? -8.x
How did you set the information for your program to use the CCDT file? - Set using command: setx MQCHLLIB C:\test\ /M setx MQCHLTAB cctdtest.TAB /M
Show us the C# code that creates the parameters and newing of the MQQueueManager class enter code here
var connectionProperties = new Hashtable();
connectionProperties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_MANAGED);
//In case of network issues - reconnect to same queue manager
if (!string.IsNullOrEmpty(MQHostName))
{
connectionProperties.Add(MQC.CONNECT_OPTIONS_PROPERTY, MQC.MQCNO_RECONNECT_Q_MGR);
connectionProperties.Add(MQC.CONNECTION_NAME_PROPERTY, String.Format("{0}({1})", MQHostName, MQPort));
}
//Start Creating Inbound connection for reading the messages.
if (MQQueueNameIn != null && MQQueueNameIn.Length > 0)
{
queueManagerIn = new MQQueueManager(MQManagerName, connectionProperties);
queueIn = queueManagerIn.AccessQueue(MQQueueNameIn, MQC.MQOO_BROWSE + MQC.MQOO_INPUT_SHARED + MQC.MQOO_FAIL_IF_QUIESCING + MQC.MQOO_INQUIRE);
}