您好我想从我的电脑上登录wepshere mq的不同凭据。错误信息就是这样。
The call to initialize the User ID 'mypcuser' failed with CompCode 2 and Reason
2035. If an MQCSP block was used, the User ID in the MQCSP block was 'mydifferentuser' user'.
ACTION:
Correct the error and try again.
错误地,我看到了我的differentuser和mypcuserboth的用户
我的代码和我的设置属性,如何使用给定的用户名和密码身份验证登录wephshere mq
public Hashtable init(String connectionType, string hostName, string channel)
{
Hashtable connectionProperties = new Hashtable();
// Add the connection type
// connectionProperties.Add(MQC.TRANSPORT_PROPERTY, connectionType);
connectionProperties.Add(MQC.USER_ID_PROPERTY, "mydifferentuser");
connectionProperties.Add(MQC.PASSWORD_PROPERTY, "xxx");
connectionProperties.Add(MQC.CONNECTION_NAME_PROPERTY, hostName);
connectionProperties.Add(MQC.CHANNEL_PROPERTY, channel);
connectionProperties.Add(MQC.MQADPCTX_YES,1);
....
MQQueueManager qMgr = new MQQueueManager(QueueManagerName, connectionProperties);
答案 0 :(得分:0)
connectionProperties.Add(MQC.USER_ID_PROPERTY, "username");
connectionProperties.Add(MQC.PASSWORD_PROPERTY,"****");
connectionProperties.Add(MQC.USE_MQCSP_AUTHENTICATION_PROPERTY, true);
这些属性必须设置客户端.net代码。
并且在webpsheremq方面,用户名必须设置为mca字段。用户必须在计算机中拥有权限。