public static bool CreateVdir(string vdir, string phydir)
{
ServerManager serverManager = new ServerManager();
Site mySite = serverManager.Sites["Default Web Site"];
mySite.Applications.Add("/" + vdir, phydir); serverManager.CommitChanges();
return true;
}
Site mySite = iisManager.Sites.Add("test", "http", "*:80:" + WebName + ".intranet." + TLD, @"c:\Webs\" + WebName);
public static void CreateAppPool( string appPoolName)
{
try {
ServerManager serverManager = new ServerManager();
serverManager.ApplicationPools.Add(appPoolName);
ApplicationPool apppool = serverManager.ApplicationPools[appPoolName];
apppool.ManagedPipelineMode = ManagedPipelineMode.Classic;
serverManager.CommitChanges();
apppool.Recycle(); }
catch { }
}
public static void AssignVDirToAppPool(string vdir, string appPoolName)
{
try
{
ServerManager serverManager = new ServerManager();
Site site = serverManager.Sites["Default Web Site"];
site.Applications["/" + vdir].ApplicationPoolName = appPoolName;
serverManager.CommitChanges();
}
catch { }
}
public static bool DeleteVdir(string vDirName)
{
try
{
ServerManager serverManager = new ServerManager();
Site mySite = serverManager.Sites["Default Web Site"];
Microsoft.Web.Administration.Application application = mySite.Applications["/" + vDirName];
mySite.Applications.Remove(application);
serverManager.CommitChanges();
return true;
}
catch {
return false;
}
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有