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;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Microsoft.Web.PlatformInstaller;
|
using Microsoft.Web.PlatformInstaller;
|
||||||
|
@ -188,9 +189,11 @@ namespace WebsitePanel.Server.WPIService
|
||||||
{
|
{
|
||||||
_installationStatus = EWPIServiceStatus.InstallationComplete;
|
_installationStatus = EWPIServiceStatus.InstallationComplete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CheckIISAlive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void InstallStatusUpdatedHandler(object sender, InstallStatusEventArgs e)
|
private void InstallStatusUpdatedHandler(object sender, InstallStatusEventArgs e)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
@ -242,6 +245,27 @@ namespace WebsitePanel.Server.WPIService
|
||||||
_statusMessage = sb.ToString();
|
_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
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue