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 » Error 2012 when launch an MQ application as windows service

Post new topic  Reply to topic
 Error 2012 when launch an MQ application as windows service « View previous topic :: View next topic » 
Author Message
thdfedl
PostPosted: Mon Dec 07, 2009 10:40 am    Post subject: Error 2012 when launch an MQ application as windows service Reply with quote

Newbie

Joined: 07 Dec 2009
Posts: 3

Hello everybody,
I 've got a strange pb using MQ .NET API.
i've installed the MQSeries client v6 with the latest Fix 2.0.8.
I'm developping an .net application using MQ .net API (amqmdnet.dll, amqmdxcs.dll).
The application listens permanently to a Queue.
The application works fine as a windows console application.
But when i install this application as a windows service and try to launch it, i get an MQException with reason code 2012.
I've also tried to develop a windows service directly in VS 2005, but i got the same pb.

I was searching and trying all the solutions i found on the net, but nothing works.

Has anyone encountered the same problem ? is there a solution ?

The application bugs on the line code where i instanciate the MQQueueManager.
MQQueueManager mQmg = new MQQueueManager(qManagerName, connectionProperties);

Thanks for any help that you can provide.

thdfedl.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Dec 07, 2009 8:07 pm    Post subject: Re: Error 2012 when launch an MQ application as windows serv Reply with quote

Grand High Poobah

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

thdfedl wrote:
The application bugs on the line code where i instanciate the MQQueueManager.
MQQueueManager mQmg = new MQQueueManager(qManagerName, connectionProperties);


What kind of connection are you using? Is the user that runs the service the same as the one running the console app? Does it have the same profile? The same path and so forth?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
thdfedl
PostPosted: Tue Dec 08, 2009 12:19 am    Post subject: Reply with quote

Newbie

Joined: 07 Dec 2009
Posts: 3

i'm using a MQC.TRANSPORT_MQSERIES_CLIENT connection.
The user is the "local system account" for the service.
Is there something special i must do with this account ?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Dec 08, 2009 2:49 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Write a .bat or .com file that configures everything so that your app launches just fine.

Use that to launch your app as a service.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Dec 08, 2009 5:01 am    Post subject: Reply with quote

Grand High Poobah

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

thdfedl wrote:
Is there something special i must do with this account ?




It's not referencing the client libraries correctly (or at all) the way the "real" user is. You'll need to correct the profile for that user; personally I'd create a new "real" user for the application to use because I've never had much luck getting this to work as that local user.

This method yields a variety of other challenges - security, passwords, non-generic user used generically, etc, etc. Speak to your site security people and see which they dislike least.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
thdfedl
PostPosted: Tue Dec 08, 2009 5:48 am    Post subject: Reply with quote

Newbie

Joined: 07 Dec 2009
Posts: 3

Vitor wrote:

It's not referencing the client libraries correctly (or at all) the way the "real" user is. You'll need to correct the profile for that user; personally I'd create a new "real" user for the application to use because I've never had much luck getting this to work as that local user.

This method yields a variety of other challenges - security, passwords, non-generic user used generically, etc, etc. Speak to your site security people and see which they dislike least.


I've installed the two libraries amqmdnet.dll and amqmdxcs.dll in the GAC.
I've tried to reference them in the GAC and directly in C:\Program files\IBM\WebSphere MQ\bin but i've got the same result.
I've created a specific user for the service with same profile as the user that launch the console app but i've got the same problem.
This problem is very strange.

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 » Error 2012 when launch an MQ application as windows service
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.