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 » C# application connecting to QueueManager - set UserID

Post new topic  Reply to topic
 C# application connecting to QueueManager - set UserID « View previous topic :: View next topic » 
Author Message
cynik
PostPosted: Tue Mar 31, 2009 2:45 am    Post subject: C# application connecting to QueueManager - set UserID Reply with quote

Newbie

Joined: 31 Mar 2009
Posts: 9

I have C# application (Windows XP) using MQ client which connects to QueueManager (on AIX server). MQ is version 6.0

Everything works fine until i try to set another UserId and Password via properies MQEnvironment.UserId and MQEnvironment.Password - then I am getting 2035 not authorized error.

For example, I am trying to set UserId to "appluser" (which is member of mqm group on the AIX server). When I run the C# application under user "appluser" (run as..) then everything is ok, but when I set this user programatically in code -> the exception 2035 comes up.

Here is part of the code (doesn't work with commented lines):
// MQEnvironment.UserId = userName;
// MQEnvironment.Password = password;
MQEnvironment.Hostname = host;
MQEnvironment.Port = port;
MQEnvironment.Channel = channel;
MQQueueManager queueManager = new MQQueueManager(queueManagerName);

Am I doing something wrong? Pls
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 31, 2009 2:54 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

You would need to use something like the managed .NET client...
Anything making use of the c MQ Client libraries will send the logged in user.

As a workaround do use contact admin.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
cynik
PostPosted: Tue Mar 31, 2009 2:59 am    Post subject: Reply with quote

Newbie

Joined: 31 Mar 2009
Posts: 9

I am using managed MQ client (amqmdnet.dll).
And so far I am using "run as.." as a workaround, but it is not very convenient
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 31, 2009 3:06 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

cynik wrote:
I am using managed MQ client (amqmdnet.dll).
And so far I am using "run as.." as a workaround, but it is not very convenient

May be I was not precise enough...
Managed MQ Client here refers to a client connection/transport mode. Not to a dll or coding practice.
amqmdnet.dll gets used in managed client and unmanaged client connection modes.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Mar 31, 2009 4:50 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I don't think there's any way to code .NET to allow you to manually specify a user id. Even with the managed connection.

.NET does not have the conceit of Java that it should run on any platform and ignore the OS.

The other option aside from Run As is to use SSL certificates and either MCAUSER or an exit to match certs with ids.
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 » C# application connecting to QueueManager - set UserID
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.