public void TestGetServiceStatus_IISAdminRunning()
        {
            string status = _appMonitorService.GetServiceStatus(serverName, serviceName);

            if (status != "Running")
            {
                _appMonitorService.StartService(serverName, serviceName);
            }

            status = _appMonitorService.GetServiceStatus(serverName, serviceName);
            Assert.AreEqual("Running", status);
            Console.WriteLine(@"IISAdmin Service Status: " + status);
        }
예제 #2
0
 public void RestartService(ApplicationService servie)
 {
     SelectedService.Status = _statusMonitorService.GetServiceStatus(SelectedService.ServerName, SelectedService.ServiceName);
 }