停止WebClientService时拒绝访问

时间:2014-09-30 17:04:36

标签: c# web-services

我想以编程方式停止WebClient Service,但我没有权限。

ServiceController[] services = ServiceController.GetServices();
foreach (ServiceController service in services)
{
    if (service.ServiceName == "WebClientService")
    {
        service.Stop();
    }
}

0 个答案:

没有答案