ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Security » Unable to Connect to IBMMQ Server using IBMMQ .NET Client

Post new topic  Reply to topic Goto page 1, 2  Next
 Unable to Connect to IBMMQ Server using IBMMQ .NET Client « View previous topic :: View next topic » 
Author Message
hschia
PostPosted: Tue Jul 17, 2012 3:50 am    Post subject: Unable to Connect to IBMMQ Server using IBMMQ .NET Client Reply with quote

Newbie

Joined: 17 Jul 2012
Posts: 8

I was try to connect to IBMMQ Server use following VB .Net code and error showing "2538-MQRC_HOST_NOT_AVAILABLE".

MQEnvironment.Hostname = IPAddress ' & "(" & PORT& ")"
MQEnvironment.Channel = MQChannel
MQEnvironment.UserId = "Test"
MQEnvironment.Password = "Pass"
MQEnvironment.properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES)

IBMMQMgr = New MQQueueManager(MQQueueManagerName)


In IBMMQ Server, I noticed that the userid and password are different as above but use current login user id with empty password. Anyone please advice how to solve this issues and provide sample code to solve it.

Thanks in advance.
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Jul 17, 2012 4:13 am    Post subject: Re: Unable to Connect to IBMMQ Server using IBMMQ .NET Clien Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

I'm no developer, but I think as you are specifying client attributes, this:

Code:
MQEnvironment.properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES)

should be this:

Code:
MQEnvironment.properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT)


And do please read up on what a queue manager does with userids and passwords passed to it...
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
hschia
PostPosted: Tue Jul 17, 2012 4:32 am    Post subject: Reply with quote

Newbie

Joined: 17 Jul 2012
Posts: 8

I already tried

MQEnvironment.properties.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_CLIENT)

but same result is getting.

I also try using as below but same result is getting as stated previously.

properties(MQC.HOST_NAME_PROPERTY) = IPAddress
properties(MQC.PORT_PROPERTY) = Port
properties(MQC.CHANNEL_PROPERTY) = MQChannel
properties(MQC.USER_ID_PROPERTY) = "Test"
properties(MQC.PASSWORD_PROPERTY) = "Pass"
properties(MQC.TRANSPORT_PROPERTY) = MQC.TRANSPORT_MQSERIES

IBMMQMgr = New MQQueueManager(m_Parameters.IBMMQQueueManagerName) ', properties)
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 17, 2012 4:49 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Did you check the documented causes of that reason code? Are none of those relevant?

Have you confirmed that the details you provide (especially whatever "MQChannel" resolves to) work with either one of the client samples and/or a client enabled support pac?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
hschia
PostPosted: Tue Jul 17, 2012 5:00 am    Post subject: Reply with quote

Newbie

Joined: 17 Jul 2012
Posts: 8

Yes, If I take out the security control from MQ Server, it is working well. It can connect without any error.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 17, 2012 5:09 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

hschia wrote:
Yes, If I take out the security control from MQ Server, it is working well. It can connect without any error.


Irrespective of the transport type you specify? What connection method from .NET do you think you're using?

Can you also describe exactly how you're "taking out the security control from MQ Server" and where this server is running? Is it local to the code?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
WBI_User21
PostPosted: Tue Jul 17, 2012 5:13 am    Post subject: Reply with quote

Voyager

Joined: 12 Jun 2007
Posts: 98

http://www-01.ibm.com/support/docview.wss?uid=swg21297556
_________________
Ranga
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 17, 2012 5:56 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

WBI_User21 wrote:
http://www-01.ibm.com/support/docview.wss?uid=swg21297556


Quite correctly underlining the comment made earlier.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
hschia
PostPosted: Tue Jul 17, 2012 6:52 am    Post subject: Reply with quote

Newbie

Joined: 17 Jul 2012
Posts: 8

Client side:
If a security exit is defined for the client, then this security exit may validate the password.
If a security exit is not defined for the client, then the value of the password is transmitted to the server.


As follow the link, how can I pass the userid and password using security exit? Have any sample code?
Back to top
View user's profile Send private message
j_santanu
PostPosted: Tue Jul 17, 2012 6:56 am    Post subject: Reply with quote

Newbie

Joined: 24 Sep 2004
Posts: 6
Location: Kolkata, India

There is a security exit implemented in the server connection channel on server side to validate the UserId and Password both. It has been observed that the UserId is coming as windows login user and password as blank. The UserId and Password set in the MQEnvironment or hash table in the .Net code is not coming to the MQ Server for authentication. So the connection fails.

Can somebody help on why the UserId and Password set in MQEnvironment or hashtable is not coming for authentication to the server. Is there any issue with the code mentioned earlier or any configuration/setup needs to be done, so that the UserId and Password set in the MQEnvironment works.

Also, like to add that using a Java client program, providing the same credentials in MQEnvironment is working perfectly. .Net program is not working in the same manner.
_________________
Regards
Santanu
Kolkata, India
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Tue Jul 17, 2012 7:04 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

j_santanu wrote:
Can somebody help on why the UserId and Password set in MQEnvironment or hashtable is not coming for authentication to the server.


Whoever wrote the security exit would seem to be the first person to ask, especially as the channel works with Java. I would theorise that the exit is making Java-based assumptions about how the information is being passed.

Note that the WMQ Server doesn't use the password, as that link states. It's the id being blank that's not helping you any.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Jul 17, 2012 7:06 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Have you hijacked the post or are you a colleague of hschia? If so, then please state that so we know we're looking at the same problem. If not, then please state that you are having the same issue so that we don't get confused - or any more so than our caffeine-addled states already provide!

j_santanu wrote:
There is a security exit implemented in the server connection channel on server side to validate the UserId and Password both. It has been observed that the UserId is coming as windows login user and password as blank. The UserId and Password set in the MQEnvironment or hash table in the .Net code is not coming to the MQ Server for authentication. So the connection fails.

Can somebody help on why the UserId and Password set in MQEnvironment or hashtable is not coming for authentication to the server. Is there any issue with the code mentioned earlier or any configuration/setup needs to be done, so that the UserId and Password set in the MQEnvironment works.

Also, like to add that using a Java client program, providing the same credentials in MQEnvironment is working perfectly. .Net program is not working in the same manner.

If the password is not being flowed, put a trap in the code to print out the content of the property to ensure it is actually being populated.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
j_santanu
PostPosted: Tue Jul 17, 2012 7:30 am    Post subject: Reply with quote

Newbie

Joined: 24 Sep 2004
Posts: 6
Location: Kolkata, India

exerk wrote:
Have you hijacked the post or are you a colleague of hschia?


Sorry for not mentioning that. Yes, I am a colleague of hschia.

We have captured the UserId and Password came to the server and found that the windows login user and a blank password is coming for authentication, not the UserId and Password set in the MQEnvironment.

Regards
Santanu
Back to top
View user's profile Send private message Yahoo Messenger
exerk
PostPosted: Tue Jul 17, 2012 7:32 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

j_santanu wrote:
exerk wrote:
Have you hijacked the post or are you a colleague of hschia?


Sorry for not mentioning that. Yes, I am a colleague of hschia.

We have captured the UserId and Password came to the server and found that the windows login user and a blank password is coming for authentication, not the UserId and Password set in the MQEnvironment.

Regards
Santanu


exerk wrote:
If the password is not being flowed, put a trap in the code to print out the content of the property to ensure it is actually being populated.

_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Fri Jul 27, 2012 10:24 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

j_santanu wrote:
There is a security exit implemented in the server connection channel on server side to validate the UserId and Password both. It has been observed that the UserId is coming as windows login user and password as blank. The UserId and Password set in the MQEnvironment or hash table in the .Net code is not coming to the MQ Server for authentication. So the connection fails.

Can somebody help on why the UserId and Password set in MQEnvironment or hashtable is not coming for authentication to the server. Is there any issue with the code mentioned earlier or any configuration/setup needs to be done, so that the UserId and Password set in the MQEnvironment works.

Also, like to add that using a Java client program, providing the same credentials in MQEnvironment is working perfectly. .Net program is not working in the same manner.

Are you using WMQ v7.1 on the client-side? If so, you need to open a PMR with IBM, as WMQ v7.1 .NET implementation is broken (flowing UserID and Passwords) and you need a fix from IBM.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Security » Unable to Connect to IBMMQ Server using IBMMQ .NET Client
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.