【发布时间】:2011-05-05 07:31:41
【问题描述】:
我使用这个函数调用编写了一个连接到本地队列管理器的应用程序:
MQQueueManager mqQMgr = new MQQueueManager("QM_QueueManagerName");
现在我需要连接到另一台计算机上的远程队列管理器。
我可以使用 MQ Explorer 从我的开发 PC 成功连接到远程队列管理器,使用 QM_ComputerName 作为队列管理器名称,S_ComputerName 作为通道,ComputerName 作为连接名称。所以它可以从我的桌面访问。
但是,当我尝试通过 .Net 连接时,无论我尝试什么,我都会收到 MQRC_Q_MGR_NAME_ERROR。
我尝试指定
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");
我在这两种情况下都会出错。
谁能给点建议?
【问题讨论】: