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 API Support » MQ 2035 Error On Discrete Connection Params

Post new topic  Reply to topic
 MQ 2035 Error On Discrete Connection Params « View previous topic :: View next topic » 
Author Message
bob8799
PostPosted: Thu Dec 11, 2008 12:48 pm    Post subject: MQ 2035 Error On Discrete Connection Params Reply with quote

Novice

Joined: 10 Dec 2008
Posts: 13

In Windows, when I connect using the MQSERVER variable and just use...

Code:
mqQMgr = new MQQueueManager(txtMQMgr.Text);


...I can get a connection. But when I try to specify in .NET code as...

Code:
MQEnvironment.Hostname = txtMQHost.Text;
MQEnvironment.Channel = txtMQChan.Text;
MQEnvironment.Port = Convert.ToInt32("1413");
MQEnvironment.UserId = @"HTS\rhorn";
MQEnvironment.Password = "";

mqQMgr = new MQQueueManager(txtMQMgr.Text);


...I get 2035 errors. The server shows that I am passing ((None)) as the user (SID). The user on the MQ server is "rhorn". The HTS is the domain.
If I use...

Code:
MQEnvironment.UserId = "rhorn";


...I also get 2035 errors.
Back to top
View user's profile Send private message
bob8799
PostPosted: Thu Dec 18, 2008 12:37 pm    Post subject: Solved Reply with quote

Novice

Joined: 10 Dec 2008
Posts: 13

What I didn't know what that using Environment.UserName overrides the MQSERVER variable. So for MQ's that use the Windows user to log in, you simply do not use the .UserID and .Password settings at all as:

Code:
'Open a connection to the MQ Mgr.
MQEnvironment.Channel = lblMQChannel.Text
MQEnvironment.Hostname = lblMQHost.Text
MQEnvironment.Port = intPort
If (strQMgr = "XXXXX" And strLoc = "YYYYY") Then
      'This overrides the MQSERVER var UserID
       MQEnvironment.UserId = USER
       MQEnvironment.Password = ""
End If


Where USER is a constant string (or passed in as a var if you wish) that contains the special user ID.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQ 2035 Error On Discrete Connection Params
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.