PDA

View Full Version : MSMQ does not start through the dependent windows service, until reboot the computer



skindika
03-19-2009, 06:44 PM
Hi,

I have implemented a C# windows service (Let say "ABC") which depends on MSMQ Service. Dependency was set through the following registry Key and the values are given below.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\ABC\DependOnService]

Value Name: DependOnService
Value Type: REG_MULTI_SZ
Value: MSMQ

It is required to run my windows service under an administrator account.
MSMQ is running under the "Local System" account. Once I add this registry, until i reboot my computer, this dependency does not work, which means,

1. Both MSMQ and my windows service are stopped and then i try to start my windows service. But, It does not start since MSMQ is not getting started, even the dependency is configured properly.

2. When I stop MSMQ Service, it does not pop up warning message to confirm the stopping MSMQ.
But, Once I reboot my computer above two scenarios are working fine which means dependency is working properly. My question is do I need to reboot my computer at all, once I add this registry values ??.
If the answer is "Yes" is there a way to get work this dependency without reboot my computer.
Appreciate your help.

Thanks,
Indika Sanath.

JohnBreakwell
05-20-2009, 03:50 PM
Hi,

The problem is that all service information is cached on startup. Modifying the configurations of the services will have no effect until the cache is refreshed after a subsequent restart.

If there is any way round this, it will be by talking to the Windows Service Control Manager (SCM) API directly.

Cheers
John Breakwell (MSFT)

otangdi
11-24-2009, 03:55 PM
The problem is that all service information is cached on startup. Modifying the configurations of the services will have no effect until the cache is refreshed after a subsequent restart.
______________________
Devis comparatif mutuelle sante | (http://comparatifmutuelle.org/)Comparateur mutuelles sante | (http://comparatifmutuelle.org/)Comparer comparatif mutuel (http://comparatifmutuelle.org/)

lisamarietuck
11-27-2009, 12:41 AM
As a Newbie, I am always searching online for stuff that can help me. Thank you for your help.

housefull
01-19-2010, 10:35 PM
I accept with information:1. Both MSMQ and my windows service are stopped and then i try to start my windows service. But, It does not start since MSMQ is not getting started, even the dependency is configured properly.

2. When I stop MSMQ Service, it does not pop up warning message to confirm the stopping MSMQ.
But, Once I reboot my computer above two scenarios are working fine which means dependency is working properly. My question is do I need to reboot my computer at all, once I add this registry values ??.
If the answer is "Yes" is there a way to get work this dependency without reboot my computer.
Appreciate your help.
__________________
Watch Legion Movie Online Free (http://moviesonlinefree.biz/)