diff --git a/WebsitePanel/Sources/VersionInfo.cs b/WebsitePanel/Sources/VersionInfo.cs index bab95752..6df85ee7 100644 --- a/WebsitePanel/Sources/VersionInfo.cs +++ b/WebsitePanel/Sources/VersionInfo.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.239 +// Runtime Version:4.0.30319.261 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -16,7 +16,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyCompany("Outercurve Foundation")] [assembly: AssemblyCopyright("Copyright © 2011 Outercurve Foundation.")] [assembly: AssemblyVersion("1.2.1.0")] -[assembly: AssemblyFileVersion("1.2.1.3")] +[assembly: AssemblyFileVersion("1.2.1.4")] [assembly: AssemblyInformationalVersion("1.2.1")] diff --git a/WebsitePanel/Sources/VersionInfo.vb b/WebsitePanel/Sources/VersionInfo.vb index 63fbed4c..1e052c11 100644 --- a/WebsitePanel/Sources/VersionInfo.vb +++ b/WebsitePanel/Sources/VersionInfo.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.239 +' Runtime Version:4.0.30319.261 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -18,6 +18,6 @@ Imports System.Runtime.InteropServices diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs index 445074c5..807c2e1e 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Web.IIS70/IIs70.cs @@ -902,8 +902,9 @@ namespace WebsitePanel.Providers.Web // #endregion + #region ColdFusion script mappings - //ColdFusion + //ColdFusion code if (virtualDir.ColdFusionInstalled) { handlersSvc.AddScriptMaps(virtualDir, COLDFUSION_EXTENSIONS, ColdFusionPath, @@ -1348,26 +1349,78 @@ namespace WebsitePanel.Providers.Web #region ColdFusion Virtual Directories using (ServerManager srvman = webObjectsSvc.GetServerManager()) { - if (ColdFusionDirectoriesAdded(srvman, site.SiteId)) + //TODO: NANOFIX:Added the If block and put the rest of the code in the else block(For Virtual Directory) + if (string.IsNullOrEmpty(base.CFFlashRemotingDirPath)) { - if (!site.CreateCFVirtualDirectories) - { - DeleteCFVirtualDirectories(site.SiteId); - site.CreateCFVirtualDirectories = false; - } + DeleteCFVirtualDirectories(site.SiteId); + site.CreateCFVirtualDirectories = false; } else { - if (site.CreateCFVirtualDirectories) + if (ColdFusionDirectoriesAdded(srvman, site.SiteId)) { - CreateCFVirtualDirectories(site.SiteId); - site.CreateCFVirtualDirectories = true; + if (!site.CreateCFVirtualDirectories) + { + DeleteCFVirtualDirectories(site.SiteId); + site.CreateCFVirtualDirectories = false; + } + } + else + { + if (site.CreateCFVirtualDirectories) + { + CreateCFVirtualDirectories(site.SiteId); + site.CreateCFVirtualDirectories = true; + } } } } #endregion - // remove dedicated pools if any + #region ColdFusionHandlerFix + //TODO: NANOFIX: Region Added for Cold Fusion Handler Fix + using (ServerManager srvman = webObjectsSvc.GetServerManager()) + { + var appConfig = srvman.GetApplicationHostConfiguration(); + ConfigurationSection handlersSection = appConfig.GetSection(Constants.HandlersSection, (site as WebVirtualDirectory).FullQualifiedPath); + + var handlersCollection = handlersSection.GetCollection(); + + List cfElementList = new List(); + foreach (var action in handlersCollection) + { + var name = action["name"].ToString(); + if (string.Compare(name, "coldfusion", true) == 0) + { + cfElementList.Add(action); + } + } + foreach (var e in cfElementList) + { + handlersCollection.Remove(e); + } + if (site.ColdFusionInstalled) + { + + var cfElement = handlersCollection.CreateElement("add"); + + cfElement["name"] = "coldfusion"; + cfElement["modules"] = "IsapiModule"; + cfElement["path"] = "*"; + cfElement["scriptProcessor"] = base.ColdFusionPath; + cfElement["verb"] = "*"; + cfElement["resourceType"] = "Unspecified"; + cfElement["requireAccess"] = "None"; + cfElement["preCondition"] = "bitness64"; + handlersCollection.AddAt(0, cfElement); + + + } + srvman.CommitChanges(); + } + #endregion + + // remove dedicated pools if any if (deleteDedicatedPools) DeleteDedicatedPoolsAllocated(site.Name); diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Utils/FileUtils.cs b/WebsitePanel/Sources/WebsitePanel.Server.Utils/FileUtils.cs index 78c3cd82..54bd5f60 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.Utils/FileUtils.cs +++ b/WebsitePanel/Sources/WebsitePanel.Server.Utils/FileUtils.cs @@ -622,6 +622,7 @@ namespace WebsitePanel.Providers.Utils ProcessStartInfo startInfo = new ProcessStartInfo(cmd, args); startInfo.WindowStyle = ProcessWindowStyle.Hidden; startInfo.RedirectStandardOutput = true; + startInfo.StandardOutputEncoding = Encoding.UTF8; startInfo.UseShellExecute = false; startInfo.CreateNoWindow = true;