Groups | Blog | Home
all groups > dotnet general > april 2008 >

dotnet general : windows service problem


Andrew
4/23/2008 6:11:01 AM
Hi,

I've created a windows application C# service according to:
http://msdn2.microsoft.com/en-us/library/ms123402.aspx?wa=wsignin1.0

But my service is not appearing in the computer management panel at all.
Any ideas ?

Norman Yuan
4/23/2008 7:16:03 AM
Have you started the service after installed it? A Windows service can be
set to automatic start when machine is turned on, or manaul start. If it is
latter, you will not see it in task manager until it gets started manually
(or by other programs).

[quoted text, click to view]
Andrew
4/23/2008 7:37:00 AM
Thanks for your reply.

But I don't even see the application on the "Computer Management\Services"
panel. So I can't even start the application up. I've tried both automatic
and manual modes. No luck.

Can it be a problem with my computer itself ?

cheers
Andrew

[quoted text, click to view]
Andrew
4/23/2008 7:47:04 AM
I've looked into the Windows Task Manager window.

I see the application running there as "MyNewService.vhost.exe".
1) Shouldn't it be just ".exe" and not the ".vhost.exe" ?
2) I've tried to EndProcess, but it keeps on coming back again.
3) I still can't see the application in the Computer Management /Services
window.

cheers
Andrew

[quoted text, click to view]
Phil Wilson
4/23/2008 9:39:47 AM
That link isn't workiung for me, so I don't know if it has installation
instructions using installutil, installer classes or a setup project.
If you're seeing ...vshost.exe that's the Visual Studio debugging host, so
perhaps you've got a debug version installed or something.

--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


[quoted text, click to view]

Andrew
4/23/2008 10:10:12 AM
sorry about that, here's the link again.

http://msdn2.microsoft.com/en-us/library/zt39148a(VS.80).aspx

cheers

[quoted text, click to view]
Phil Wilson
4/24/2008 2:13:52 PM
It's a bit vague there about installation, but what you have to do is a
Setup&Deployment Project, adding your service executable to it, and adding
custom actions referring to your service executable with InstallerClass
true. Calling the installer class methods as custom actions is what installs
and uninstalls your service.
--
Phil Wilson
Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


[quoted text, click to view]

AddThis Social Bookmark Button