您的位置:首页 > 移动开发

Add application pool to the website

2010-07-28 19:03 267 查看
DirectoryEntry _RootFolder = new DirectoryEntry("IIS://localhost/W3SVC/1/ROOT");
DirectoryEntry _VirDir = _RootFolder.Children.Add(@"OKWeb", "IIsWebVirtualDir");
_VirDir.Properties["Path"].Value = @"C:\test"; //设置路径
_VirDir.Invoke("AppCreate", true);
//设置名称
_VirDir.Properties["AppFriendlyName"].Value = "OkWeb";
_VirDir.Properties["AppIsolated"].Value = 2;
_VirDir.CommitChanges();
_RootFolder.CommitChanges();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐