Click here to Skip to main content
15,885,244 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 asp.net 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="10.10.182.37(1514)"/>
   <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:

try
           {

               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);

               objMQQueue = objMQQueueManager.AccessQueue(txtMQName.Text, MQC.MQOO_INQUIRE | MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING | MQC.MQOO_SET_IDENTITY_CONTEXT);
               //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;
           }
       }
Posted
Updated 24-Jan-23 4:38am
v2
Comments
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 - https://www.ibm.com/docs/en/ibm-mq/9.2?topic=codes-2381-094d-rc2381-mqrc-key-repository-error. 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