public static void SetASPNetVersion(DirectoryEntry siteDE, AspDotNetVersion newVersion) { String targetAspNetVersion = AspDotNetWMIVersionConst.VersionString(newVersion); //Need to initialize the script maps for the first time if not setup yet if (siteDE.Properties["ScriptMaps"].Count == 0) { foreach (String sc in ScriptMaps) { siteDE.Properties["ScriptMaps"].Add(sc); } } //loop through the script maps for (int i = 0; i < siteDE.Properties["ScriptMaps"].Count; i++) { //replace the versions if they exists siteDE.Properties["ScriptMaps"][i] = siteDE.Properties["ScriptMaps"][i].ToString().Replace(AspDotNetWMIVersionConst.AspNetV1, targetAspNetVersion); siteDE.Properties["ScriptMaps"][i] = siteDE.Properties["ScriptMaps"][i].ToString().Replace(AspDotNetWMIVersionConst.AspNetV11, targetAspNetVersion); siteDE.Properties["ScriptMaps"][i] = siteDE.Properties["ScriptMaps"][i].ToString().Replace(AspDotNetWMIVersionConst.AspNetV2, targetAspNetVersion); siteDE.Properties["ScriptMaps"][i] = siteDE.Properties["ScriptMaps"][i].ToString().Replace(AspDotNetWMIVersionConst.AspNetV4, targetAspNetVersion); } siteDE.CommitChanges(); }
public override void SetASPDotNetVersion(AspDotNetVersion version) { ApplicationPool appPool = ServerMgr.ApplicationPools[site.ApplicationDefaults.ApplicationPoolName]; appPool.ManagedRuntimeVersion = AspDotNetServerManagerVersionConst.VersionString(version); CommitServerManagerChanges(); }
public override void SetASPDotNetVersion(AspDotNetVersion version) { DirectoryEntry virDir = IISWMIHelper.GetIIsWebVirtualDir(SiteId); ScriptMapper.SetASPNetVersion(virDir, version); virDir.CommitChanges(); }
public static String VersionString(AspDotNetVersion version) { FieldInfo fi = typeof(AspDotNetServerManagerVersionConst).GetField(version.ToString()); return((fi == null) ? "" : Convert.ToString(fi.GetValue(null))); }
public abstract void SetASPDotNetVersion(AspDotNetVersion version);
public static String VersionString(AspDotNetVersion version) { FieldInfo fi = typeof(AspDotNetServerManagerVersionConst).GetField(version.ToString()); return (fi == null) ? "" : Convert.ToString(fi.GetValue(null)); }