如何从IIS中删除虚拟目录条目?
我已经编写了一些代码来删除虚拟目录,但是它所做的只是删除了虚拟目录下的文件夹结构,而不是 IIS 中的实际虚拟条目,因此,如果我打开 IIS,我仍然可以看到默认 Web 下的列表地点。
如何在删除虚拟站点的同时删除条目,以便在“默认网站”下不列出任何内容?
I have written some code to delete Virtual Directories, however all that it is doing is that it deleted the folder structures beneath the Virtuals and not the actual virtual entries in IIS, so that if I open IIS I can still see the listings under Default Web Site.
How does one delete virtual while also deleting the entries so that nothing is listed under Default Web Site?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该适用于 IIS6(元数据库配置系统)和 IIS7(基于 xml 的配置系统):
其中 siteIndex 是站点的索引,vdirName 是 vdir 的名称。
This should work for both IIS6 (metabase config system) and IIS7 (xml-based config system):
where siteIndex is an index of your site and vdirName is the name of your vdir.