0
Answer

Unable to stop a windows service on the local computer

santhosh Reddy

santhosh Reddy

15y
3.8k
1

I am creating an object of servicecontroller() like

system,.serviceprocess.servicecontroller objService = new servicecontroller(Service Name);

Iam trying to stop the service using

   objService.Stop(); but i am unable to start the service.

I tried by writing the above statement 2 times,

 objService.Stop();

  objService.Stop();                 

now iam able to stop the service. why so?

please help me.Its very urgent