virtualdirectory newvirdir = new virtualdirectory(virtualdir,pathdir,anonymoususer); if (iismg.create(newvirdir)) console.write(virtualdir+ " 创建成功!"); else console.write(virtualdir+ " 创建不成功!"); }
iismg.close();
(二)createwebdir.cs 是转贴过来的,我作了些完善和修改
///*********************************************************** ///************** iis控制管理类 ************** ///************** 转贴自: 飞刀 http://www.aspcn.com ************* ///*********************************************************** using system; using system.data; using system.directoryservices; using system.collections;