Below piece of code always returns 2059 MQRC_Q_MGR_NOT_AVAILABLE
. I have not setup any .ini file, will that have any impact?
Server side log states below error:
AMQ9637: During handshake, the remote partner sent no certificate.
EXPLANATION:
The conversation cannot begin because a certificate has not been supplied by
the remote partner.
My code:
var properties = new Hashtable();
properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_MANAGED);
properties.Add(MQC.SSL_PEER_NAME_PROPERTY, "CN=BL9UZ8L");
MQEnvironment.Hostname = "xyz.com";
MQEnvironment.Port = 6000;
MQEnvironment.Channel = "2BMQ.NET.SPL";
MQEnvironment.SSLKeyRepository = "*SYSTEM";
MQEnvironment.SSLCertRevocationCheck = false;
MQEnvironment.SSLCipherSpec = "TLS_RSA_WITH_AES_128_CBC_SHA256";//"TLS_RSA_WITH_AES_256_CBC_SHA256";
MQEnvironment.CertificateLabel = "2BMQ_PROD";
Environment.SetEnvironmentVariable("MQDOTNET_TRACE_ON", "2");
queueManager = new MQQueueManager("BL9UZ8L", properties);
I had the same problem as above (and a couple of other problems). Here are my findings, hope they are helpful:
Note that all my problems was due to my client not providing the server with a client certificate.