如何以编程方式配置 IIS 6?

发布于 2024-10-05 22:24:47 字数 213 浏览 0 评论 0 原文

我看到有一个不错的库 Microsoft.Web.Administration 允许您配置 IIS 7。看来 Microsoft.Web.Administration 不适用于 IIS6,所以我想看看是否有人可以提供一些替代建议。

我正在构建一个 Windows 窗体应用程序,它将允许您实现配置所需的所有属性(网站、虚拟目录、应用程序池等)。

I see that there is a nice library Microsoft.Web.Administration that allows you to configure IIS 7. It appears that Microsoft.Web.Administration doesn't work for IIS6, so I am trying to see if someone can provide some alternative suggestions.

I am building a Windows Form Application that will allow you to implement all the properties required to configure (Website, Virtual directories, Application pools...etc).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花开雨落又逢春i 2024-10-12 22:24:47

要配置 IIS6,您必须恢复到 System.Directory 服务。

string iisPath = "IIS://localhost/W3svc/1/Root";
DirectoryEntry IISRootEntry = new DirectoryEntry(iisPath);

并从那里拿走它。

希望这有帮助,

To configure IIS6 you will have to revert to the System.Directory services.

string iisPath = "IIS://localhost/W3svc/1/Root";
DirectoryEntry IISRootEntry = new DirectoryEntry(iisPath);

and take it from there.

Hope this helps,

默嘫て 2024-10-12 22:24:47

有一个名为 ADSUtil.vbs 位于 IIS 的管理目录中,可用于以脚本方式(如果不是编程方式)配置 IIS。你可以呼唤它,或者阅读它并撕掉它的内部结构。

There is a massive VB script called ADSUtil.vbs that lives in IIS's admin directory that can be used to configure IIS in a scripted, if not programmatic, way. You could either call out to it, or read it and rip off its internals.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文