Beispiel #1
0
        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();
        }
Beispiel #2
0
        public override void SetASPDotNetVersion(AspDotNetVersion version)
        {
            ApplicationPool appPool = ServerMgr.ApplicationPools[site.ApplicationDefaults.ApplicationPoolName];

            appPool.ManagedRuntimeVersion = AspDotNetServerManagerVersionConst.VersionString(version);
            CommitServerManagerChanges();
        }
Beispiel #3
0
        public override void SetASPDotNetVersion(AspDotNetVersion version)
        {
            DirectoryEntry virDir = IISWMIHelper.GetIIsWebVirtualDir(SiteId);

            ScriptMapper.SetASPNetVersion(virDir, version);
            virDir.CommitChanges();
        }
Beispiel #4
0
        public static String VersionString(AspDotNetVersion version)
        {
            FieldInfo fi = typeof(AspDotNetServerManagerVersionConst).GetField(version.ToString());

            return((fi == null) ? "" : Convert.ToString(fi.GetValue(null)));
        }
Beispiel #5
0
 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));
 }
 public override void SetASPDotNetVersion(AspDotNetVersion version)
 {
     ApplicationPool appPool = ServerMgr.ApplicationPools[site.ApplicationDefaults.ApplicationPoolName];
     appPool.ManagedRuntimeVersion = AspDotNetServerManagerVersionConst.VersionString(version);
     CommitServerManagerChanges();
 }
 public abstract void SetASPDotNetVersion(AspDotNetVersion version);