I have a service application written in C# and under certain circumstances, I would like it to terminate itself. This would happen after the service has been running for a
Don't have the service run under Local Service. Have it run under a user that has the rights to stop a service.
Although the idea of self-terminating services is not the best of ideas. That very fact alone means that it should be an application, and not a service.