From cc83c20be2d62169aec014d6ddb01c943a43bd44 Mon Sep 17 00:00:00 2001 From: Ruslan Keba Date: Tue, 29 Oct 2013 16:18:55 +0200 Subject: [PATCH 1/3] Checking of Helicon Ape registration fixed --- .../WebsitePanel.Providers.Web.IIS70/IIs70.cs | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs index c09632a1..0f3e1ea5 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs @@ -2218,15 +2218,36 @@ namespace WebsitePanel.Providers.Web if (!string.IsNullOrEmpty(registrationInfo)) return registrationInfo; + string ApeRegistryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Helicon\\Ape"; + long dtFirstRunBinary = 0L; + try + { + dtFirstRunBinary = (long) Registry.GetValue(ApeRegistryPath, "FirstRun", 0L); + } + catch(NullReferenceException) + { + // nothing + } - long dtFirstRunBinary = (long)Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Helicon\\Ape", "FirstRun", 0L); + if (0 == dtFirstRunBinary) + { + ApeRegistryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Helicon\\Ape"; + try + { + dtFirstRunBinary = (long) Registry.GetValue(ApeRegistryPath, "FirstRun", 0L); + } + catch(NullReferenceException) + { + // nothing + } + } DateTime dtFirstRun; if (0 == dtFirstRunBinary) { dtFirstRun = DateTime.Now; - Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Helicon\\Ape", "FirstRun", dtFirstRun.ToBinary(),RegistryValueKind.QWord ); + Registry.SetValue(ApeRegistryPath, "FirstRun", dtFirstRun.ToBinary(),RegistryValueKind.QWord ); } else { From 663800c22540f08d8a18d1a7def271afd435d1ca Mon Sep 17 00:00:00 2001 From: Ruslan Keba Date: Tue, 29 Oct 2013 17:45:18 +0200 Subject: [PATCH 2/3] Generating of link to Helicon Ape httpd.conf editor from IIS properties page fixed --- .../WebsitePanel/ProviderControls/IIS70_Settings.ascx.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 07b39190..511e0b80 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 @@ -331,7 +331,8 @@ namespace WebsitePanel.Portal.ProviderControls return HostModule.EditUrl("ItemID", PanelRequest.ItemID.ToString(), ctrlKey, "Name=" + name, PortalUtils.SPACE_ID_PARAM + "=" + int.Parse(Request.QueryString["ServiceID"]), - "ReturnUrlBase64="+ EncodeTo64(Server.UrlEncode(Request.Url.PathAndQuery)) + "ReturnUrlBase64="+ EncodeTo64(Server.UrlEncode(Request.Url.PathAndQuery)), + "UserID="+PanelSecurity.LoggedUserId.ToString() ); } From 2a221f793da8617ed3df77d11bc2ec74b725282b Mon Sep 17 00:00:00 2001 From: Ruslan Keba Date: Wed, 30 Oct 2013 11:43:20 +0200 Subject: [PATCH 3/3] Consts introduced in Helicon Ape stuff --- .../WebsitePanel.Providers.Web.IIS70/IIs70.cs | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs index 0f3e1ea5..5594f308 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs @@ -110,10 +110,13 @@ namespace WebsitePanel.Providers.Web // true handler name public const string HeliconApeHandler = "Helicon.Ape Handler"; public const string HeliconApeHandlerType = "Helicon.Ape.Handler"; - public const string HeliconApeHandlerPath = "*.apehandler"; - - public const string IsapiModule = "IsapiModule"; + + public const string HeliconApeRegistryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Helicon\\Ape"; + public const string heliconApeRegistryPathWow6432 = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Helicon\\Ape"; + + + public const string IsapiModule = "IsapiModule"; public const string FastCgiModule = "FastCgiModule"; public const string CgiModule = "CgiModule"; @@ -2066,10 +2069,10 @@ namespace WebsitePanel.Providers.Web private string GetHeliconApeInstallDir(string siteId) { //Check global registration - string installDir = Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Helicon\\Ape", "InstallDir", string.Empty) as string; + string installDir = Registry.GetValue(Constants.heliconApeRegistryPathWow6432, "InstallDir", string.Empty) as string; if (string.Empty == installDir) { - installDir = Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Helicon\\Ape", "InstallDir", string.Empty) as string; + installDir = Registry.GetValue(Constants.HeliconApeRegistryPath, "InstallDir", string.Empty) as string; } return installDir; @@ -2218,12 +2221,12 @@ namespace WebsitePanel.Providers.Web if (!string.IsNullOrEmpty(registrationInfo)) return registrationInfo; - string ApeRegistryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Helicon\\Ape"; + string apeRegistryPath = Constants.HeliconApeRegistryPath; long dtFirstRunBinary = 0L; try { - dtFirstRunBinary = (long) Registry.GetValue(ApeRegistryPath, "FirstRun", 0L); + dtFirstRunBinary = (long) Registry.GetValue(apeRegistryPath, "FirstRun", 0L); } catch(NullReferenceException) { @@ -2232,10 +2235,10 @@ namespace WebsitePanel.Providers.Web if (0 == dtFirstRunBinary) { - ApeRegistryPath = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Helicon\\Ape"; + apeRegistryPath = Constants.heliconApeRegistryPathWow6432; try { - dtFirstRunBinary = (long) Registry.GetValue(ApeRegistryPath, "FirstRun", 0L); + dtFirstRunBinary = (long) Registry.GetValue(apeRegistryPath, "FirstRun", 0L); } catch(NullReferenceException) { @@ -2247,7 +2250,7 @@ namespace WebsitePanel.Providers.Web if (0 == dtFirstRunBinary) { dtFirstRun = DateTime.Now; - Registry.SetValue(ApeRegistryPath, "FirstRun", dtFirstRun.ToBinary(),RegistryValueKind.QWord ); + Registry.SetValue(apeRegistryPath, "FirstRun", dtFirstRun.ToBinary(),RegistryValueKind.QWord ); } else { @@ -3478,7 +3481,6 @@ namespace WebsitePanel.Providers.Web public const string WDeployAppHostConfigWriter = "WDeployAppHostConfigWriter"; public const string WDeployAppPoolConfigEditor = "WDeployAppPoolConfigEditor"; - private void SetupWebDeployPublishingOnServer(List messages) { if (IsWebDeployInstalled() == false