Author |
Message
|
prasannavs |
Posted: Fri Feb 20, 2004 10:47 am Post subject: Help ! VB.NET authentication using userid and Password |
|
|
Newbie
Joined: 20 Feb 2004 Posts: 2
|
We are using a VB.NET Windows Application to connect to MQ Series Q Manager. Like to pass a userid and password to connect to the MQ Series Q Manager, but the .NET interface does not implement MQEnvironment.userid and MQEnvironment.password.
Is there any other way we could do this ?
Thanks
Pras |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Feb 20, 2004 10:57 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Change which user is executing your VB app. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
prasannavs |
Posted: Fri Feb 20, 2004 12:31 pm Post subject: Is there a way i can pass both the userID and password ? |
|
|
Newbie
Joined: 20 Feb 2004 Posts: 2
|
We do NOT have the option of running the application as someonelse due to some other issues. Does the .NET interface classes for MQ Series Client support passing userid and password ?
I'm using mq series 5.3 client. The .NET interface i have probably for 5.2 does not seem to have that support
thanks |
|
Back to top |
|
 |
JasonE |
Posted: Fri Feb 20, 2004 3:00 pm Post subject: |
|
|
Grand Master
Joined: 03 Nov 2003 Posts: 1220 Location: Hursley
|
No, the .net layer ends up calling the C layer and hence uses the signed on userid. You have no option but to do the initial connect under the userid running the .net app. You could look at altusr for other operations but not the connect |
|
Back to top |
|
 |
brad_blackmon |
Posted: Thu Mar 04, 2004 7:07 pm Post subject: |
|
|
 Newbie
Joined: 04 Mar 2004 Posts: 4 Location: Washington, D.C.
|
I had this exact same problem with my project. Here's what I did to solve it. The primary problem is connecting to the remote queue manager when the user running the VB app is not defined as a valid user on the Queue manager box. You get the dreaded 2035 return code. At first glance the AlternateUserID property looks to be the saving grace, but there is nothing in the constructor of the MQQueueManager object to specify the AlternateUserID.
The trick I found was to connect to the Queue Manager using a specific channel, where the MCA UserID property is set to a valid MQ user. When you tell the MQQueueManager object to connect using this channel, MQ ignores the current VB user's username and uses the MCA UserID username instead. Once the connection to the Queue Manager is complete, then you can connect to your queue and pass in the AlternateUserID.
Just so you know, this all but defeats security on your queue and queue manager, but depending on your application and/or environment, this might not be an issue.
I hope this helps,
Brad |
|
Back to top |
|
 |
|