c# windows service does not work

S

S Moran

no the problem was that the article (forgot?) to mention that you need to
add an installer to the service
 
M

Mr. Arnold

S Moran said:
no the problem was that the article (forgot?) to mention that you need to
add an installer to the service

The article talked about the installer, where you go to the Command Prompt
and use InstallUtil. You can have an installer in the project for the
service, but you don't need one, if you are using InstallUtil, which can
also be used to uninstall the service -- InstallUtil servicename.exe -u.


Step 3: Install and Run the Service

Build of this application makes one exe, mcWinService.exe. You need to call
installutil to
egister this service from command line.
installutil C:\mcWebService\bin\Debug\mcWebService.exe
You use /u option to uninstall the service.
installutil /u C:\mcWebService\bin\Debug\mcWebService.exe
Run the application
 
S

S Moran

no... without the installer class, installutil does NOT work.
i just verified this... unless theres some way i dont see
 
M

Mr. Arnold

S Moran said:
no... without the installer class, installutil does NOT work.
i just verified this... unless theres some way i dont see

I have installed some .Net Services, and I don't ever recall placing a
installer in the Service Project, as a matter of fact I took it out, because
it was giving me problems.

Granted, that was with .Net 2003 and framework 1.1. I have not done one
using .Net 2005 and framework 2.0, which I also have never had to install a
log file either with the installer. I just created the log file on the fly
when the service started up and checked if it alread exist and not to create
it on the start of the service, without using the installer with .Net 2003.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top