ASP.NET对IIS中的虚拟目录进行操作的代码

时间:2021-01-10 01:15:40
【文件属性】:
文件名称:ASP.NET对IIS中的虚拟目录进行操作的代码
文件大小:23KB
文件格式:PDF
更新时间:2021-01-10 01:15:40
.NET AS IS 代码如下: //假如虚拟目录名为”Webtest”,先在项目中引用 //System.DirectoryServices.dll,再 using System.DirectoryServices; protected System.DirectoryServices.DirectoryEntry dirroot; 1、添加新的虚拟目录 代码如下: DirectoryEntry newVirDir = dirroot.Children.Add(“Webtest”,”IIsWebVirtualDir”); newVirDir.Invoke(“AppCreate”,true); newVirDi

网友评论