1

This question was already answered by joshmc but I'm not understanding the answer after a lot of digging. And don't have enough points to post a comment, sorry.

C# MQ Connect get Error 2035 but Java MQ Connect works well

I only have access to the client and can't change the server, which belongs to a third-party. They require we post messages to their IBM MQ server over the internet for XML integration. We have some simple Java code working fine but can't get the same thing running in .NET because of the 2035 issue. We have a username and password. Trying to do both from the same Windows 10 desktop. Using the version 8 client libraries in both Java and .NET.

The answer Josh discussed was to run

ALTER CHL(ServerChannel) CHLTYPE(SVRCONN) MCAUSER('mq').

This looks like a server-side command or how do we run this on the client, ideally in C#?

Ali
  • 2,702
  • 3
  • 32
  • 54
  • You are correct that it is a server side command, and it was just one example of a way to solve the problem described by the original poster of that question. In your case, has the third-part MQ admin told you how to provide security information? Can you add to this question how you specify the username and password in your .NET code? Can you ask the MQ admin to provide you with the error they see on the queue manager's log file when you get the 2035 failure? Can you confirm that they actually validate the password or if they just expect you to send the proper username? – JoshMc Dec 11 '18 at 04:40
  • Scott, note that you can always comment on your own question and answers to it no matter your rep. – JoshMc Dec 12 '18 at 14:21

1 Answers1

3

The given command is an example of an MQSC command.

To invoke this from your client machine will only be possible if you have been given permissions to make administrative changes on the server from your client.

To try, set up an environment variable to indicate where the server is and what channel name to use:

set MQSERVER=CHANNEL-NAME/TCP/hostname(port)

Then use the runmqsc command as follows:-

runmqsc -c -u yourUserId

The runmqsc tool will prompt you for a password and then try to connect. If it is successful you can then type in the MQSC command. If the MQSC command fails you will have to get the owner of the queue manager to make the change for you.

Morag Hughson
  • 7,255
  • 15
  • 44