IIS API - 创建虚拟目录?
只是寻找相关文档。 示例不是必需的,但我们将不胜感激。
我们遇到的情况是,我们必须手动创建数百个虚拟目录,而自动化似乎是目前提高流程效率的好方法。
也许明年我们可以重新设计服务器环境,以允许一些更理智的事情,例如 URL 重写(不幸的是,这在当前的 Web 应用程序周期中似乎不可行)。 继承垃圾代码不是很好吗?
〜威廉·赖利·兰德
Just looking for the relevant documentation. An example is not necessary, but would be appreciated.
We have a situation where we are having to create 100s of virtual directories manually, and it seems like automating this would be a good way to make the process more efficient for now.
Perhaps next year we can rework the server environment to allow something more sane, such as URL rewriting (unfortunately this does not seem feasible in the current cycle of the web application). Isn't it great to inherit crap code?
~ William Riley-Land
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用 vbscript 也更容易做到。
It is easier to do it with vbscript too..
显然,您也可以通过 PowerShell 脚本执行此操作:
以下是文档:MSDN - 使用IIS 编程管理
Evidently you can also do this via PowerShell scripting:
Here is the documentation: MSDN - Using IIS Programmatic Administration
未经测试(来自旧代码库,由我的前承包商编写)
NOT TESTED (from an old code base and written by a former contractor of mine)
WIX 安装程序工具创建了一种管理此操作的方法 - 您可以将它们定义为安装构建指令的一部分。 配置所有项目需要一些工作,但之后维护应该变得轻而易举...这是关于创建虚拟目录条目的教程的摘录...
6.3 Web 目录
The WIX installer tool creates a way to manage this - you would define them as a part of the installation build instructions. It make some work to get all of the project configured but after that maintenance should be a breeze... Here is an excerpt from the Tutorial on creating the Virtual Directory entries...
6.3 Web Directory