] = "IIsWebVirtualDir"; //表示操作的是虚拟目录 paras[1] = strVirdir; rootfolder.Invoke("Delete",paras); rootfolder.CommitChanges(); } else { //throw new Exception("Can''t delete " + strVirdir + ",because it isn''t exists."); } } //批量更新 public void UpdateBatch() { BatchUpdate(_virdirs); } //重载一个:-) public void UpdateBatch(VirtualDirectories vds) { BatchUpdate(vds); } /// ///私有方法 /// public void Close() { _virdirs.Clear(); _virdirs = null; rootfolder.Dispose(); } //连接服务器 private void ConnectToServer() { string strPath = "IIS://" + _server + "/W3SVC/" + _website +"/ROOT"; try { this.rootfolder页码:[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 第8页、共10页 |