Click here to Skip to main content
15,882,464 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to resolve exception while connecting to MQ Manager in with c#. I am getting the below exception MQRC_KEY_REPOSITORY_ERROR. I am using amqmdnet dll for MQ connectivity
Below are the MQ configuration details
<add key="MQ_MANAGER" value="HBAX013D"/>
   <add key="MQ_CHANNEL" value="DDS.SVR.CONN.SSL.CHL"/>
   <add key="MQ_CONNECTION" value=""/>
   <add key="MQ_REPLY" value="DDS.REPLY"/>
   <add key="MQ_REQUEST" value="GEN.DISPATCHER.REQ"/>
   <add key="SSL_ALGORITHM" value="RC4_SHA_US"/>
   <add key="SSL_KEYLOCATION" value="C:\WMQClient\SSL\key12\key"/>

What I have tried:


               if (chkSSLEnbled.Checked == true)
                   MQEnvironment.SSLCipherSpec = txtCipherSpec.Text;
                   MQEnvironment.SSLKeyRepository = txtKeyRepository.Text;
               //WriteLog("writeMessage: Connecting to DDS MQ Manager..", false);
               txtLog.Text += "btnConnect_Click()-Connecting to MQ Managaer" + Environment.NewLine;

               objMQQueueManager = new IBM.WMQ.MQQueueManager(txtMqManager.Text, txtMQChannel.Text, txtMqConnection.Text);

               //WriteLog("writeMessage: Connected to DDS MQ MAnager..", false);
               txtLog.Text += "btnConnect_Click()-Connected to MQ Manager" + Environment.NewLine;

           catch (Exception ex)
               txtLog.Text += "btnConnect_Click()-MQ Connectivity Process Failed with Exception: " + ex.Message
                             + Environment.NewLine + " with Inner Exception:" + ex.InnerException
                             + Environment.NewLine + " at Stack Trace: " + ex.StackTrace + Environment.NewLine;
Updated 24-Jan-23 4:38am
Andre Oosthuizen 25-Jan-23 5:23am    
It seems that the location of the key repository is either not specified, not valid, or results in an error when used to access the key repository as per this page - Not sure if this will solve your problem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900