Services are a little bit different from regular executables. In order to
run a service, it first need to be registered within the system, as it will
be started not by launching the .exe file, but by means of Service Control
Manager - a part of Windows managing all services. There's a kind of
protocol (namely, a sequence of SCM calls to your service) being executed
when a service starts.
To register the service with SCM, you need to add an installer class for the
service. To the best of my knowledge, there is a prepackaged installer class
in the framework designed just to register services within the system (and
this is documented in MSDN). This installer class will be invoked by the
installutil.exe utility to perform the registration. Now, that the service
is known to the Service Control Manager, it can be started by the ways
described in the error message you are getting.
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx
"scarred wind" <sc*********@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Thank you very much to those who have helped me.
My Error Prompt:
Window Service Start Failure:
Cannot start service from the command line or debugger. A Windows
Service must first be installed (using installutil.exe) and then started
with the ServerExplorer, Windows Service Administrative tool or the NET
START command.
I still can't figure it out, I hope you can be patient with me, I'm
quite new to C#. I thank you very much for helping me get around this
thing.
----------------------------------------------------------
when you fear to fail, you fear something that has not yet happened.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!