diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Common/Global.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Common/Global.cs index 95d2900a..9aba71c8 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Common/Global.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Common/Global.cs @@ -135,7 +135,7 @@ namespace WebsitePanel.Installer.Common { get { - if (IISVersion.Major == 7) + if (IISVersion.Major >= 7) { return new string[] { "IIS_IUSRS" }; } @@ -167,7 +167,7 @@ namespace WebsitePanel.Installer.Common { get { - if (IISVersion.Major == 7) + if (IISVersion.Major >= 7) { return new string[] { "IIS_IUSRS" }; } diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Common/Utils.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Common/Utils.cs index cd036dd1..17eec103 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Common/Utils.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/Common/Utils.cs @@ -284,7 +284,7 @@ namespace WebsitePanel.Installer.Common return; //ignore win64 check on IIS7 - if (Global.IISVersion.Major == 7) + if (Global.IISVersion.Major >= 7) return; if (!IIS32Enabled()) diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/ServiceComponentNotFoundException.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/ServiceComponentNotFoundException.cs index d0f2ab78..a684d1dc 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/ServiceComponentNotFoundException.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer.Core/ServiceComponentNotFoundException.cs @@ -7,8 +7,6 @@ namespace WebsitePanel.Installer.Core { class ServiceComponentNotFoundException : Exception { - private string p; - public ServiceComponentNotFoundException(string p) : base(p) { diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/App.config b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/App.config index 6d720948..18e7f2ee 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/App.config +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/App.config @@ -5,7 +5,6 @@ - diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe index d8a686af..d0cbdc57 100644 Binary files a/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe and b/WebsitePanel.Installer/Sources/WebsitePanel.Installer/Updater.exe differ diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/ServerActionManager.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/ServerActionManager.cs index b65e7355..4b46d129 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/ServerActionManager.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/ServerActionManager.cs @@ -341,7 +341,7 @@ namespace WebsitePanel.Setup.Actions var netbiosDomain = userDomain; var userName = vars.UserAccount; var iisVersion = vars.IISVersion; - var iis7 = (iisVersion.Major == 7); + var iis7 = (iisVersion.Major >= 7); // if (!String.IsNullOrEmpty(userDomain)) { @@ -377,7 +377,7 @@ namespace WebsitePanel.Setup.Actions var identity = GetWebIdentity(vars); var componentId = vars.ComponentId; var iisVersion = vars.IISVersion; - var iis7 = (iisVersion.Major == 7); + var iis7 = (iisVersion.Major >= 7); var poolExists = false; // @@ -447,7 +447,7 @@ namespace WebsitePanel.Setup.Actions { var appPoolName = String.Format(AppPoolNameFormatString, vars.ComponentFullName); var iisVersion = vars.IISVersion; - var iis7 = (iisVersion.Major == 7); + var iis7 = (iisVersion.Major >= 7); var poolExists = false; // Log.WriteStart(LogStartUninstallMessage); @@ -507,7 +507,7 @@ namespace WebsitePanel.Setup.Actions var domain = vars.WebSiteDomain; var contentPath = vars.InstallationFolder; var iisVersion = vars.IISVersion; - var iis7 = (iisVersion.Major == 7); + var iis7 = (iisVersion.Major >= 7); var userName = CreateWebApplicationPoolAction.GetWebIdentity(vars); var userPassword = vars.UserPassword; var appPool = vars.WebApplicationPoolName; @@ -593,7 +593,7 @@ namespace WebsitePanel.Setup.Actions void IUninstallAction.Run(SetupVariables vars) { var iisVersion = vars.IISVersion; - var iis7 = (iisVersion.Major == 7); + var iis7 = (iisVersion.Major >= 7); var siteId = vars.WebSiteId; // try @@ -963,7 +963,7 @@ namespace WebsitePanel.Setup.Actions void IInstallAction.Run(SetupVariables vars) { - if (vars.IISVersion.Major == 7) + if (vars.IISVersion.Major >= 7) { ChangeAspNetVersionOnIis7(vars); } diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/StandaloneServerActionManager.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/StandaloneServerActionManager.cs index 13cffc2b..f50bcf66 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/StandaloneServerActionManager.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Actions/StandaloneServerActionManager.cs @@ -316,7 +316,7 @@ namespace WebsitePanel.Setup.Actions serviceInfo.Comments = string.Empty; //check IIS version - if (ServerSetup.IISVersion.Major == 7) + if (ServerSetup.IISVersion.Major >= 7) { serviceInfo.ProviderId = 101; } diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Global.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Global.cs index 22556149..52affc1e 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Global.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Global.cs @@ -114,7 +114,7 @@ namespace WebsitePanel.Setup { get { - if (IISVersion.Major == 7) + if (IISVersion.Major >= 7) { return new string[] { "AD:Domain Admins", "SID:" + SystemSID.ADMINISTRATORS, "IIS_IUSRS" }; } @@ -146,7 +146,7 @@ namespace WebsitePanel.Setup { get { - if (IISVersion.Major == 7) + if (IISVersion.Major >= 7) { return new string[] { "IIS_IUSRS" }; } @@ -178,7 +178,7 @@ namespace WebsitePanel.Setup { get { - if (IISVersion.Major == 7) + if (IISVersion.Major >= 7) { return new string[] { "IIS_IUSRS" }; } diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Utils.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Utils.cs index 5d00203b..e4e4cfb8 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Utils.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Common/Utils.cs @@ -561,7 +561,7 @@ namespace WebsitePanel.Setup // By default we fallback to the corresponding tool version based on the platform bitness var util = Environment.Is64BitOperatingSystem ? AspNet40RegistrationToolx64 : AspNet40RegistrationToolx86; // Choose appropriate tool version for IIS 7 - if (setupVariables.IISVersion.Major == 7 && setupVariables.SetupAction == SetupActions.Update) + if (setupVariables.IISVersion.Major >= 7 && setupVariables.SetupAction == SetupActions.Update) { // Evaluate app pool settings on x64 platform only when update is running if (Environment.Is64BitOperatingSystem == true) @@ -747,7 +747,7 @@ namespace WebsitePanel.Setup public static void OpenFirewallPort(string name, string port, Version iisVersion) { - bool iis7 = (iisVersion.Major == 7); + bool iis7 = (iisVersion.Major >= 7); if (iis7) { //TODO: Add IIS7 support diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ConfigurationCheckPage.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ConfigurationCheckPage.cs index 6f49d5b7..5b30d56a 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ConfigurationCheckPage.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ConfigurationCheckPage.cs @@ -397,7 +397,7 @@ namespace WebsitePanel.Setup private bool SiteBindingsExist(SetupVariables setupVariables) { - bool iis7 = (setupVariables.IISVersion.Major == 7); + bool iis7 = (setupVariables.IISVersion.Major >= 7); string ip = setupVariables.WebSiteIP; string port = setupVariables.WebSitePort; string domain = setupVariables.WebSiteDomain; diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs index 93bd3bae..be97f333 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/ExpressInstallPage.cs @@ -362,7 +362,7 @@ namespace WebsitePanel.Setup XmlDocument doc = new XmlDocument(); doc.Load(webConfigPath); // do Windows 2008 platform-specific changes - bool iis7 = (Wizard.SetupVariables.IISVersion.Major == 7); + bool iis7 = (Wizard.SetupVariables.IISVersion.Major >= 7); // #region Do IIS 7 and IIS 6 specific web.config file changes if (iis7) @@ -776,7 +776,7 @@ namespace WebsitePanel.Setup serviceInfo.Comments = string.Empty; //check IIS version - if (Wizard.SetupVariables.IISVersion.Major == 7) + if (Wizard.SetupVariables.IISVersion.Major >= 7) { serviceInfo.ProviderId = 101; } @@ -1610,7 +1610,7 @@ namespace WebsitePanel.Setup return; Version iisVersion = Wizard.SetupVariables.IISVersion; - bool iis7 = (iisVersion.Major == 7); + bool iis7 = (iisVersion.Major >= 7); Log.WriteStart("Stopping IIS Application Pool"); Log.WriteInfo(string.Format("Stopping \"{0}\"", appPool)); @@ -1645,7 +1645,7 @@ namespace WebsitePanel.Setup return; Version iisVersion = Wizard.SetupVariables.IISVersion; - bool iis7 = (iisVersion.Major == 7); + bool iis7 = (iisVersion.Major >= 7); Log.WriteStart("Starting IIS Application Pool"); Log.WriteInfo(string.Format("Starting \"{0}\"", appPool)); @@ -2256,7 +2256,7 @@ namespace WebsitePanel.Setup string domain = Wizard.SetupVariables.WebSiteDomain; bool update = Wizard.SetupVariables.UpdateWebSite; Version iisVersion = Wizard.SetupVariables.IISVersion; - bool iis7 = (iisVersion.Major == 7); + bool iis7 = (iisVersion.Major >= 7); if (!update) return; @@ -2696,7 +2696,7 @@ namespace WebsitePanel.Setup string identity = userName; string netbiosDomain = userDomain; Version iisVersion = Wizard.SetupVariables.IISVersion; - bool iis7 = (iisVersion.Major == 7); + bool iis7 = (iisVersion.Major >= 7); try { @@ -2860,7 +2860,7 @@ namespace WebsitePanel.Setup Log.WriteStart("Creating web site"); Log.WriteInfo(string.Format("Creating web site \"{0}\" ( IP: {1}, Port: {2}, Domain: {3} )", siteName, ip, port, domain)); Version iisVersion = Wizard.SetupVariables.IISVersion; - bool iis7 = (iisVersion.Major == 7); + bool iis7 = (iisVersion.Major >= 7); //check for existing site string oldSiteId = iis7 ? WebUtils.GetIIS7SiteIdByBinding(ip, port, domain) : WebUtils.GetSiteIdByBinding(ip, port, domain); @@ -3018,7 +3018,7 @@ namespace WebsitePanel.Setup SetProgressText("Creating local account..."); string componentId = Wizard.SetupVariables.ComponentId; Version iisVersion = Wizard.SetupVariables.IISVersion; - bool poolExists = ( iisVersion.Major == 7) ? + bool poolExists = (iisVersion.Major >= 7) ? WebUtils.IIS7ApplicationPoolExists(name) : WebUtils.ApplicationPoolExists(name); @@ -3027,7 +3027,7 @@ namespace WebsitePanel.Setup //update app pool Log.WriteStart("Updating application pool"); Log.WriteInfo(string.Format("Updating application pool \"{0}\"", name)); - if ( iisVersion.Major == 7) + if (iisVersion.Major >= 7) WebUtils.UpdateIIS7ApplicationPool(name, userName, userPassword); else WebUtils.UpdateApplicationPool(name, userName, userPassword); @@ -3047,13 +3047,13 @@ namespace WebsitePanel.Setup // create app pool Log.WriteStart("Creating application pool"); Log.WriteInfo(string.Format("Creating application pool \"{0}\"", name)); - if (iisVersion.Major == 7) + if (iisVersion.Major >= 7) WebUtils.CreateIIS7ApplicationPool(name, userName, userPassword); else WebUtils.CreateApplicationPool(name, userName, userPassword); //register rollback action - if (iisVersion.Major == 7) + if (iisVersion.Major >= 7) RollBack.RegisterIIS7ApplicationPool(name); else RollBack.RegisterApplicationPool(name); diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/UninstallPage.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/UninstallPage.cs index 5df6124e..f9e34dfa 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/UninstallPage.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/UninstallPage.cs @@ -84,7 +84,7 @@ namespace WebsitePanel.Setup string component = Wizard.SetupVariables.ComponentFullName; string componentId = Wizard.SetupVariables.ComponentId; Version iisVersion = Wizard.SetupVariables.IISVersion; - bool iis7 = (iisVersion.Major == 7); + bool iis7 = (iisVersion.Major >= 7); try { diff --git a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/WebPage.cs b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/WebPage.cs index 0f78c132..1f9d2579 100644 --- a/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/WebPage.cs +++ b/WebsitePanel.Installer/Sources/WebsitePanel.Setup/Wizard/WebPage.cs @@ -326,7 +326,7 @@ namespace WebsitePanel.Setup return true; } } - bool iis7 = (SetupVariables.IISVersion.Major == 7); + bool iis7 = (SetupVariables.IISVersion.Major >= 7); string siteId = iis7 ? WebUtils.GetIIS7SiteIdByBinding(newIP, newPort, newDomain) : WebUtils.GetSiteIdByBinding(newIP, newPort, newDomain);