Applied ColdFusion fix from Russ. Applied encoding fix for MySQL dump.

This commit is contained in:
feodor_fitsner 2012-03-16 14:34:05 -07:00
parent 6726fc2ff7
commit cece69f704
4 changed files with 69 additions and 15 deletions

View file

@ -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<ConfigurationElement> cfElementList = new List<ConfigurationElement>();
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);