Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Access denied when start and stop services running under Local Service account using ServiceController

$
0
0

Hi,

I want to run my windows services in Local Service account.I am using a windows Service which will use ServiceController APIs to start and stop the other windows services .I am getting the error message while calling the Service Controller Start and Stop method.It is throwing access denied error.I know that it does not have permission to start and stop the other services.

I would like to know, how can we set the permission to start and stop the services programatically before calling the start and stop method.I have searched and could not find any solution to set permission.I tried setting the Control permission uisng the ServiceControllerPermission API.But it didnt help.

Thanks


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>