Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All

I am trying to connect to my Websphere MQ server but it keeps giving me 2035.I know its an auth issue but there is no security setup for the queue and i am struggling to understand why its rejecting the request.

my code:
C#
public static void Start()
            {
                //// Setup some test data
                string queueManagerName = "BETS.UAT.QM";
                string host = "10.3.103.83";
                int port = 1453;
                string channel = "TCP.CLIENTS";


                //// Setup some test data
                //string queueManagerName = "QM_TEST2";
                //string host = "10.3.103.83";
                //int port = 1421;
                //string channel = "QM_TEST.SVRCONN";

                WMQTester tester = new WMQTester();
                tester.Connect(queueManagerName, host, port, channel);
            }

            public MQQueueManager Connect(string queueManagerName, string host, int port, string channel)
            {
                MQQueueManager queueManager;

                // Setup connection information                  
                Hashtable queueProperties = new Hashtable();
                queueProperties[MQC.HOST_NAME_PROPERTY] = host;
                queueProperties[MQC.PORT_PROPERTY] = port;
                queueProperties[MQC.CHANNEL_PROPERTY] = channel;
                //queueProperties[MQC.USER_ID_PROPERTY] = "mqm";
                //queueProperties[MQC.PASSWORD_PROPERTY] = "";
                try
                {
                    // Attempt the connection
                    queueManager = new MQQueueManager(queueManagerName, queueProperties);
                    Console.WriteLine("Connected Successfully");
                }
                catch (MQException mexc)
                {
                    // TODO: Setup other exception handling
                    throw new Exception(mexc.Message
                               + " ReasonCode: " + mexc.ReasonCode
                               + "--- see list of Reason Codes at http://russsutton.com/developer/?p=45 "
                               + mexc.StackTrace, mexc);
                }

                // For now, return the queueManager to use in reading/writing messages next
                return queueManager;
            }


What I have tried:

tried implementing MCA user,tried implementing system users in the mca role.
Posted

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