Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting error 2035 connecting to remote QM through VB

Status
Not open for further replies.

dtoyer

Programmer
Feb 26, 2003
3
0
0
CA
Hi everyone, I am trying to connect to a remote queue manager through visual basic. If the remote server or client are not part of the same domain, I am getting an auth denied error (2035). :-( I believe this is due to how VB clients send the currently logged on user as the MCA User ID.

I can get around this by providing a MCA User ID for the channel: SYSTEM.DEF.SVRCONN at the server, however, this causes our java programs to fail. If I set the UserID within the VB code, it does not seem to do anything. I would like to get the VB client to connect to the remote server without changing anything at the server level. Can anyone provide any assistance.

Thanks,
David Toyer
CGI Group [3eyes]
 
There may be many ways to tackle this problem. But the 2 that are best suited are the ones that looks like you already know of.

1) Setting the mcauserid in svrconn channel. Or not setting anything in the mcauser attrib and defining a principal/user with the same name as your logged on userid at the server end.
2) Set the userid that is already known at the server end. This option, because, you said you did not want to make ANY changes at the server end. You mentioned that you were unable to do anything this way. But you never put up the problem you were facing in doing this way. This should work. You should set alternateuserid and it should work fine.

Hope this helps.

Cheers
KK
 
You can use setmqaut command on server site to give permission to the queue to a user and try to connect.

To Give a permission to Queue manager (QueueManagerName) is:
setmqauth -m QueueManagerName -t qmgr -p userid +setall
To Give a permission to a queue(QueueName belongs to Queue Manager(QueueManagerName)) is:
setmqaut -m QueueManager -n QueueName -t queue -p userid +setall

Let me know if it works.
Regards,
Ansuman.
 
aside from giving the necessary priveleges to the userid you define, you have to specify in your vb code that you are passing the extended attributes when you connect. this would be by populating the proper fields in the MQCD and MQCNO structures.

i-have-created-a-com-based-mq-dll
would-you-like-to-try-it?
Hrothgarv
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top