|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Unable to connect to MQ 5.3 queue manager from VB .net 2003 |
« View previous topic :: View next topic » |
Author |
Message
|
amayer |
Posted: Tue Aug 01, 2006 3:33 pm Post subject: Unable to connect to MQ 5.3 queue manager from VB .net 2003 |
|
|
Newbie
Joined: 01 Aug 2006 Posts: 2
|
I'm trying to connect to a remote queue from VB .NET code running on Win XP Pro using Visual Studio 2003 (.NET 1.1). When I try to connect I get an error 2035 MQRC_NOT_AUTHORIZED.
The core of my question is how a queue manager connections from VB .Net on Windows XP are authenticated on the MQ Server. I saw a forum post on this site that indicated that you can't set the userid/password programatically from .net and that it always passes your Windows userid.
Is that true? If not, how do I pass userid/password. I see the parameters and have tried them, but no matter what I get MQCR_NOT_AUTHORIZED. If so, how is the password authenticated on the server?
I've seen some thing about an 'Alter ID' (alternate id?) but don't know if that's related...
I've been stuck on this for a while. Help greatly appreciated.
More details below...
Our MQ Server is on AIX. The userid (klerch) is in the mqm group in the AIX account which should grant full admin rights. I've confirmed this with dspmqaut.
dspmqaut -m CSE.APP1 -t qmgr -p klerch
Entity klerch has the following authorizations for object CSE.APP1:
inq
set
connect
altusr
crt
dlt
chg
dsp
setid
setall
Using MQZoom (open source Java MQ client) I can connect to queue manager and the queue from the same client I'm running the VB code from.
I'm fairly certain that I've got the host, port, and channel configured OK. I've tried with the MQSERVER environment variable, and by setting programmatically via MQEnvironment object or passing a set of properties to:
New MQQueueManager("CSE.APP1", queueManagerProperties)
Neither of the following functions works to connect:
Private Function getQueueManager1() As MQQueueManager
Dim queueManager As MQQueueManager
'MQSERVER env var set to CHANNEL/TCP/HOSTNAME(PORT)
MQEnvironment.properties.Add(MQC.USER_ID_PROPERTY, "klerch")
MQEnvironment.properties.Add(MQC.PASSWORD_PROPERTY, "XXXXXXX")
MQEnvironment.properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT)
Try
queueManager = New MQQueueManager("CSE.APP1")
getQueueManager1 = queueManager
Catch mqe As IBM.WMQ.MQException
MsgBox("getQueueManager1 error " + mqe.Message())
End Try
End Function
Private Function getQueueManager2() As MQQueueManager
Dim queueManager As MQQueueManager
'MQSERVER env var set to CHANNEL/TCP/HOSTNAME(PORT)
Dim queueManagerProperties As New Hashtable
queueManagerProperties.Add(MQC.USER_ID_PROPERTY, "klerch")
queueManagerProperties.Add(MQC.PASSWORD_PROPERTY, "XXXXXXXX")
queueManagerProperties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT)
Try
queueManager = New MQQueueManager("CSE.APP1", queueManagerProperties)
getQueueManager2 = queueManager
Catch mqe As IBM.WMQ.MQException
MsgBox("getQueueManager2 error " + mqe.Message())
End Try
End Function _________________ Alan Mayer
alan4038@hotmail.com |
|
Back to top |
|
 |
amayer |
Posted: Tue Aug 01, 2006 3:50 pm Post subject: More info... |
|
|
Newbie
Joined: 01 Aug 2006 Posts: 2
|
I was just able to connect, but still looking for information.
I'm logged into my computer as user amayer. User amayer on the AIX mq server doesn't have connect access. Despite the fact that I was passing in a userid (klerch) and password that is valid on the MQ Server, it was still passing userid amayer.
I granted connect provileges to user amayer and I could connect.
Questions:
1) How is the password authenticated? It doesn't appear to be validated, since my Windows password doesn't match the password for amayer on the AIX system.
2) I really need to be able to pass the userid and password in programatically. Is there a way?
Thanks,
Alan Mayer _________________ Alan Mayer
alan4038@hotmail.com |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Aug 02, 2006 3:32 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Check capitalware's authentication exit  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|