tags:

views:

61

answers:

2

I have 2 other services running on a server and they start and stop without a problem, however one of them will not start. I can't see any difference in their implementation or config files. I'm receiving the following messages when attempting to start the service after installing it with InstallUtil:

The service is not responding to the control function

more help is available by typing NET HELPMSG 2186

NET HELPMSG 2186:

Explanation: The service cannot run your command at this time

Thanks very much in advance!

A: 

On Start event can you put

try
{
//...
}
catch(Exception ex)
{
EventLog.WriteEntry(ex.Message + ex.StackTrace);
}

and watch whats happening?

or

attach (Tools > Attach To Process) your process to Visual Studio for DEBUG. You can see whats happening with debug, but EventLog works good aswell.

Serkan Hekimoglu
Nothing seems to show up in the event viewer that's any different than what i was seeing before. Am I looking in the right place?
Music Magi
A: 

This is most likely due to service installed, then uninstalled and now you are trying to install again. Reboot the machine and try again.

UPDATE

According to the event log error, you are trying to run the service as the current logged in user (I guess you are connected using remote desktop). This is not the correct approach, you need to run the service as the LocalSystem. In the project properties window, change the identity of the service.

UPDATE 2

In the design view of the service/component class, click on serviceProcessInstaller1 (or similar) and then in tmhe properties you see a drop down: Account with 4 entries: User/LocalNetwork/LocalService/LocalSystem. Make it LocalSystem

Aliostad
I'm going to try a reboot. But I've done install/uninstalls a million times with services and have never had this problem
Music Magi
Rebooted. Same problem
Music Magi
Updated the answer, have a look.
Aliostad
Thanks very much for you response. I'm looking through the project properties for the service, but I'm not finding where to change the identity. I remember changing this in the past but can't find it now. Can you be more specific?
Music Magi
Have a look here: http://www.blog.torving.dk/post/Creating-a-Windows-Service-with-Installer-and-Setup-Deployment.aspx
Aliostad
In the design view of the service/component class, click on serviceProcessInstaller1 (or similar) and then in tmhe properties you see a drop down: Account with 4 entries: User/LocalNetwork/LocalService/LocalSystem. Make it LocalSystem
Aliostad
Thanks - Looks like a useful link. I know how to do all this and I've done it a thousand times. I just can't remember where to find that identity property. I'll bet that's the problem.
Music Magi
It may have been the "logon" property. I remember having problems in the past and fixing them by changing that value.
Music Magi
It is the "Account" property.
Aliostad
Found it. Thanks. Crossing my fingers
Music Magi
So what was the value? Was it user?
Aliostad
Still having the same problem. Same error message
Music Magi
It was set to user, like my other services that run without a hitch
Music Magi