I wrote an application that connected to local queue manager using this function call:
MQQueueManager mqQMgr = new MQQueueManager("QM_QueueManagerName");
Now I need to connect to remote queue manager on another computer.
I can successfully connect to remote queue manager using MQ Explorer from my development PC using QM_ComputerName
as queue manager name, S_ComputerName
as channel and ComputerName as connection name. So it is accessible from my desktop.
However, when I try to connect via .Net I get MQRC_Q_MGR_NAME_ERROR
no matter what I try.
I tried specifying
MQEnvironment.Hostname = "ComputerName";
MQEnvironment.Channel = "S_ComputerName ";
and then calling
mqQMgr = new MQQueueManager("QM_ComputerName");
I also tried calling
mqQMgr = new MQQueueManager("QM_ComputerName", "S_ComputerName", "ComputerName");
I get error in both cases.
Anyone can advise?