Torna al Thread

ServiceController servizio = new ServiceController("nome", "ServerIP"); //--- lo stoppo solo se è effettivamente in esecuzione o pausa if (servizio.Status != ServiceControllerStatus.Stopped && servizio.Status != ServiceControllerStatus.StopPending) { servizio.Stop(); servizio.WaitForStatus(ServiceControllerStatus.Stopped); }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5