I'm trying to access a windows service (also created by me) through a WinForms application using ServiceController:
service = new System.ServiceProcess.ServiceController("MyService")
The service returns OK and I can see the status via myservice.Status
.
But when i try to start (or stop) it, it returns the error:
Unable to open service MyService in machine '.'
I'm Administrator and the service process is running as NetworkService.
I'm new at .net and windows applications and I can't seem to further debug it.