> I have created a .Net 2.0 Windows Service which I would like to have
> stopped/Started by a .Net 2.0 client windows app.
[quoted text clipped - 6 lines]
>
> I would guess that this is a permission problem,
This is correct. Like most other objects, every service has a DACL
associated with it. By default, service DACLs only allow administrators,
power users and LocalSystem permission to start and stop the service. This
is usually what you want, since services often run in a highly privileged
context.
> so I looked into the ServiceControllerPermissions clas, but the
> documentation is not clear on how to impliment it.
>
> Is this the right class to use, and if so how do I use it?
No, it's not. ServiceControllerPermission is for code access security only,
and offers an extra layer of security for managed code. That's not what's
stopping you -- the unmanaged permissions on the service are.
Here's a KB article on service DACLs and the risks associated with changing
them: http://support.microsoft.com/kb/914392
Here's a freeware tool to change them which is slightly more intuitive than
"sc" (I didn't test it): http://www.losoft.de/ls_scacl.html

Signature
J.