Date Created: Fri 10-Jun-2011


    QRC_NOT_AUTHORIZED 2035 when using C# API to connect to Queue Manager

    Problem:

    MQSeries Exception: MQRC_NOT_AUTHORIZED
    MQSeries Exception: 2035
    MQSeries Exception: at IBM.WMQ.MQBase.throwNewMQException()
    at IBM.WMQ.MQQueueManager.Connect(String queueManagerName)
    at IBM.WMQ.MQQueueManager..ctor(String queueManagerName, Hashtable properties
    )



    Solution:

    1. Either create the correct channel that you are trying to connect to, or use the correct channel name.

    // Setup connection information

    queueProperties = new Hashtable();

    queueProperties[MQC.HOST_NAME_PROPERTY] = host;

    queueProperties[MQC.PORT_PROPERTY] = port;

    queueProperties[MQC.CHANNEL_PROPERTY] = channel;

    queueProperties[MQC.USER_ID_PROPERTY] = username;

    queueProperties[MQC.PASSWORD_PROPERTY] = password;

    2. If you have a client channel (CLNTCONN/SVERCONN) that already exists, then set the MCAUSER setting on the SVRCONN channel to ensure the client connects as the use you want. For better security you may want to consider using a security exit.

Middleware Mentor - Steven Charles Robinson

About Me

Steve Robinson has been working in IT for over 15 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware consulting. Steve comes from both an administration and development background.

Before moving to JEE, Steve was an accomplished developer and consultant for both IBM Lotus Notes and Microsoft .NET Technologies.

Follow Steve as @stevencrobinson on twitter.

Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Oracle WebLogic Categories

JBoss Categories

Other Categories