MSMQ In Windows Services

  • Thread starter Thread starter Buddhi
  • Start date Start date
B

Buddhi

Hi

I am developing a windows service which access queue. When i add the
queue to my service and add a installer and install using the
Installutil exe. it gives a error saying that the service failed to
install because it can not determined wheather a queue with format
name exists. My services installs properly with out the queue and it
works fine. When I add the queue and try to install the problem
happens. Please can any one help me.

Thanks & regards
Buddhi
 
Buddhi,

The error message might not be correct. The first thing I would check
is whether or not the account that the service is running under has access
to MSMQ (if it is a local system account, then network access is denied).

I would guess that this is most likely the case. If you run this in a
normal windows application, the code probably works, right?

Hope this helps.
 
Nicholas Paldino said:
Buddhi,

The error message might not be correct. The first thing I would check
is whether or not the account that the service is running under has access
to MSMQ (if it is a local system account, then network access is denied).

I would guess that this is most likely the case. If you run this in a
normal windows application, the code probably works, right?

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Buddhi said:
Hi

I am developing a windows service which access queue. When i add the
queue to my service and add a installer and install using the
Installutil exe. it gives a error saying that the service failed to
install because it can not determined wheather a queue with format
name exists. My services installs properly with out the queue and it
works fine. When I add the queue and try to install the problem
happens. Please can any one help me.

Thanks & regards
Buddhi

Hi Nicholas

Yes about the system account your correct it will restrict on the
account. But that was not the prob that i faced. I got it corrected.
The problem was when you add a MSMQ queue to a windows service the
Path of the queue is give as Format:Direct=OS: Then the machine name
and the queue name and when you add a installer to the queue in that
also the path is given the same way by default. When you try to
install using the Installutil exe it try to refer to the queue using
the full path name that is Including Format:Direct=OS but that is
incorrect the queue path should be only the machine name and the queue
name. So the problem will be solved when delete the Format:Direct=OS
part from the queue path. I think this will be help for some one who
is using MSMQ in a windows service.

Thank you very much for your help.

Buddhi
 
Back
Top