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

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

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

            return((fi == null) ? "" : Convert.ToString(fi.GetValue(null)));
        }
예제 #5
0
 public abstract void SetASPDotNetVersion(AspDotNetVersion version);
예제 #6
0
 public static String VersionString(AspDotNetVersion version)
 {
     FieldInfo fi = typeof(AspDotNetServerManagerVersionConst).GetField(version.ToString());
     return (fi == null) ? "" : Convert.ToString(fi.GetValue(null));
 }
예제 #7
0
 public override void SetASPDotNetVersion(AspDotNetVersion version)
 {
     ApplicationPool appPool = ServerMgr.ApplicationPools[site.ApplicationDefaults.ApplicationPoolName];
     appPool.ManagedRuntimeVersion = AspDotNetServerManagerVersionConst.VersionString(version);
     CommitServerManagerChanges();
 }
예제 #8
0
 public abstract void SetASPDotNetVersion(AspDotNetVersion version);