From dd13c67eaea3318204c5c22e29a3bdcfa6b7c9e2 Mon Sep 17 00:00:00 2001 From: ruslanht Date: Mon, 7 Jan 2013 12:20:22 +0200 Subject: [PATCH] Helicon Ape in IIS 7 settings fixed --- .../ProviderControls/IIS70_Settings.ascx.cs | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs index ba4737f3..a343dc3c 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs @@ -157,7 +157,7 @@ namespace WebsitePanel.Portal.ProviderControls downloadApePanel.Visible = false; txtHeliconApeVersion.Text = sts.Version; lblHeliconRegistrationText.Text = sts.RegistrationInfo; - + if (sts.IsEnabled) { chkHeliconApeGlobalRegistration.Checked = true; @@ -171,7 +171,7 @@ namespace WebsitePanel.Portal.ProviderControls // Build url manually, EditUrl throws exception: module is Null // pid=Servers&mid=137&ctl=edit_platforminstaller&ServerID=1&Product=HeliconApe - List qsParts= new List(); + List qsParts = new List(); qsParts.Add("pid=Servers"); qsParts.Add("ctl=edit_platforminstaller"); @@ -180,6 +180,7 @@ namespace WebsitePanel.Portal.ProviderControls qsParts.Add("WPIProduct=HeliconApe"); InstallHeliconApeLink.Attributes["href"] = "Default.aspx?" + String.Join("&", qsParts.ToArray()); + ViewState["HeliconApeInitiallyEnabled"] = null; } // @@ -273,25 +274,23 @@ namespace WebsitePanel.Portal.ProviderControls ActiveDirectoryIntegration.SaveSettings(settings); + // Helicon Ape - bool registerHeliconApeGlobbally = chkHeliconApeGlobalRegistration.Checked; - - bool bHeliconApeInitiallyEnabled = false; - if (ViewState["HeliconApeInitiallyEnabled"] != null) - bHeliconApeInitiallyEnabled = (bool)ViewState["HeliconApeInitiallyEnabled"]; - - if (registerHeliconApeGlobbally != bHeliconApeInitiallyEnabled) + if (null != ViewState["HeliconApeInitiallyEnabled"]) { - if (registerHeliconApeGlobbally) + bool registerHeliconApeGlobbally = chkHeliconApeGlobalRegistration.Checked; + if (registerHeliconApeGlobbally != (bool)ViewState["HeliconApeInitiallyEnabled"]) { - ES.Services.WebServers.EnableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"])); - } - else - { - ES.Services.WebServers.DisableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"])); + if (registerHeliconApeGlobbally) + { + ES.Services.WebServers.EnableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"])); + } + else + { + ES.Services.WebServers.DisableHeliconApeGlobally(int.Parse(Request.QueryString["ServiceID"])); + } } } - if (WDeployEnabledCheckBox.Checked)