DirectoryEntry de = new DirectoryEntry("IIS://localhost/" + "w3svc");
object[] prams = new object[2] { "IIsWebServer", Convert.ToInt32(siteName) };
DirectoryEntry site = (DirectoryEntry)de.Invoke("Create", prams); /
DirectoryEntry root = site.Children.Add("Root", "IIsWebVirtualDir");
root.Properties["AppPoolId "][0] = "test1"; //应用程序池
在创建应用程序池的时候不是这样的吗?
object[] prams = new object[2] { "IIsWebServer", Convert.ToInt32(siteName) };
DirectoryEntry site = (DirectoryEntry)de.Invoke("Create", prams); /
DirectoryEntry root = site.Children.Add("Root", "IIsWebVirtualDir");
root.Properties["AppPoolId "][0] = "test1"; //应用程序池
在创建应用程序池的时候不是这样的吗?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货