Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
 I am getting the exception MQRC_SSL_INITIALIZATION_ERROR while connecting to MQ in asp.net with c#. I am using IBM MQ Client (9.1.3) I am using amqmdnet dll (9.1.3) for the MQ connectivity. I am connecting on Windows Server 2019. 
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;
               }
              

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

           }
           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 9-Feb-23 23:51pm

1 solution

We can't tell - we have no access to your systems to check what might be going on - or any idea what the error details are.

So, it's going to be up to you.
Fortunately, you have a tool available to you which will help you find out what is going on: the debugger. If you don't know how to use it then a quick Google for "Visual Studio debugger" should give you the info you need.

Put a breakpoint on the first line in the function, and run your code through the debugger. Then look at your code, and at your data and work out what should happen manually. Then single step each line checking that what you expected to happen is exactly what did. When it isn't, that's when you have a problem, and you can back-track (or run it again and look more closely) to find out why.

Sorry, but we can't do that for you - time for you to learn a new (and very, very useful) skill: debugging!
 
Share this answer
 
Comments
Member 7513082 10-Feb-23 5:56am    
I have updated the code and while deploying to 2019 server i am getting above error. Core Code also is shared. Cannot check via debugger in the server.
OriginalGriff 10-Feb-23 6:33am    
Then you will have to fall back on older methods, and start adding logging code - we have no access to your server and it's environment at all!

Add code to write to a logfile, and check the file immediately after a crash. Narrow down exactly where the error is happening by focussing your logging info, then start adding variables to it so you can check exactly what you are passing to where.

Sorry, but we can't do any of that for you - you are the only person with access to your server and without that you can't even guess what might be happening.
Member 7513082 10-Feb-23 8:58am    
I am showing the exception from the log itself. In my code already i have set the option to read the inner exception and exception with stack trace. Exception that I got is posted also.
OriginalGriff 10-Feb-23 10:17am    
All you show us is "MQRC_SSL_INITIALIZATION_ERROR" which tells you - and us - pretty much nothing about what is happening or why.
I can guess that it's a security problem from the "SSL_INITIALIZATION" part of it, but what that problem involves is anybody's guess!

So you need information: so loggin how far through that code it gets before it errors, and what values you are actually setting at each step is a good place to start.
This is going to take you doing this, and thinking about what the log then shows - because we can't access your systems to see what values are correct and what aren't. And we certainly can't even check for the existence of a server for you code to connect to, much less how it is configured.

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