From 16d370113717919d805c6b4cc541dfb603f2dae8 Mon Sep 17 00:00:00 2001 From: Ruslan Keba Date: Tue, 9 Apr 2013 16:14:58 +0300 Subject: [PATCH] Helicon Ape status checking fixed --- .../WebsitePanel.Providers.Web.IIS70/IIs70.cs | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs index 6ec7b81d..dbf040d2 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs @@ -1914,22 +1914,27 @@ namespace WebsitePanel.Providers.Web private bool IsHeliconApeEnabled(ServerManager srvman, string siteId) { - WebSite webSite = null; - webSite = webObjectsSvc.GetWebSiteFromIIS(srvman, siteId); - if (webSite == null) - throw new ApplicationException( - String.Format("Could not find a web site with the following identifier: {0}.", siteId)); - - // Fill ASP.NET settings - FillAspNetSettingsFromIISObject(srvman, webSite); - - var aphl = new WebAppPoolHelper(ProviderSettings); - var currentPool = aphl.match_webapp_pool(webSite); - - if (aphl.pipeline(currentPool.Mode) != SiteAppPoolMode.Integrated) + if (!string.IsNullOrEmpty(siteId)) { - // Ape is not working in not Integrated pipeline mode - return false; + // Check the web site app pool in integrated pipeline mode + + WebSite webSite = null; + webSite = webObjectsSvc.GetWebSiteFromIIS(srvman, siteId); + if (webSite == null) + throw new ApplicationException( + String.Format("Could not find a web site with the following identifier: {0}.", siteId)); + + // Fill ASP.NET settings + FillAspNetSettingsFromIISObject(srvman, webSite); + + var aphl = new WebAppPoolHelper(ProviderSettings); + var currentPool = aphl.match_webapp_pool(webSite); + + if (aphl.pipeline(currentPool.Mode) != SiteAppPoolMode.Integrated) + { + // Ape is not working in not Integrated pipeline mode + return false; + } }