title: Connecting to remote queue manager using C# and .Net
body: <p>I wrote an application that connected to local queue manager using this function call: </p>
  
  <pre><code>MQQueueManager mqQMgr = new MQQueueManager("QM_QueueManagerName");
  </code></pre>
  
  <p>Now I need to connect to remote queue manager on another computer.</p>
  
  <p>I can successfully connect to remote queue manager using MQ Explorer from my development PC using <code>QM_ComputerName</code> as queue manager name, <code>S_ComputerName</code> as channel and ComputerName as connection name. So it is accessible from my desktop.</p>
  
  <p>However, when I try to connect via .Net I get <code>MQRC_Q_MGR_NAME_ERROR</code> no matter what I try.</p>
  
  <p>I tried specifying </p>
  
  <pre><code>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");
  </code></pre>
  
  <p>I get error in both cases.</p>
  
  <p>Anyone can advise?</p>