Remote server services stopping using c#

Karthikanbarasan
Posted by Karthikanbarasan under C# category on | Points: 40 | Views : 3370
using System.Diagnostics;
using System.Threading;


System.ServiceProcess.ServiceController svcobj = new System.ServiceProcess.ServiceController(ServiceName, ServerIP);
if (svc.Status.Equals(System.ServiceProcess.ServiceControllerStatus.Running))
{
svcobj .Stop();
}

Comments or Responses

Login to post response