I have develope a window service , To start and stop the service i am using folowing
code:-
public void StartService(string serviceName)
{
ServiceController service = new ServiceController(serviceName);
try
{
service.Stop();
Thread.Sleep(500);
service.Start();
Thread.Sleep(1500);
}
catch { }
}
When I use this code Running my visual studio as administrator it works fine .
but the code is not working on iis , Is there any way to open an iis application as administrator ,
For grammer Mistake Sorry.
Please Help, Thank you!

Rajkiran SwainRank #165 · 14.4K reputationPosted Nov 30, 2017, 3:08 AM EST
Mann Maurya99 reputationPosted Nov 30, 2017, 7:18 PM EST
Mann Maurya99 reputationPosted Dec 17, 2017, 9:25 PM EST
Rajkiran SwainRank #165 · 14.4K reputationPosted Dec 17, 2017, 9:43 PM EST