Merge
This commit is contained in:
commit
27059e69df
1 changed files with 25 additions and 1 deletions
|
@ -29,6 +29,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Microsoft.Web.PlatformInstaller;
|
||||
|
@ -188,6 +189,8 @@ namespace WebsitePanel.Server.WPIService
|
|||
{
|
||||
_installationStatus = EWPIServiceStatus.InstallationComplete;
|
||||
}
|
||||
|
||||
CheckIISAlive();
|
||||
}
|
||||
|
||||
|
||||
|
@ -242,6 +245,27 @@ namespace WebsitePanel.Server.WPIService
|
|||
_statusMessage = sb.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckIISAlive()
|
||||
{
|
||||
// run iisreset /start
|
||||
ProcessStartInfo processStartInfo = new ProcessStartInfo(@"C:\Windows\System32\iisreset.exe", "/start");
|
||||
processStartInfo.UseShellExecute = false;
|
||||
|
||||
try
|
||||
{
|
||||
using (Process exeProcess = Process.Start(processStartInfo))
|
||||
{
|
||||
exeProcess.WaitForExit();
|
||||
Debug.Write("WPIService: iisreset /start returns "+exeProcess.ExitCode);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Write("WPIService: iisreset /start exception: "+ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue