如何以编程方式配置IIS7? (不使用Metabase) [英] How to programmatically configure IIS7? (without using the Metabase)

查看:127
本文介绍了如何以编程方式配置IIS7? (不使用Metabase)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑在IIS中执行大量配置更改的.NET应用程序,例如更改虚拟目录或启用压缩。使用IIS6,可以使用元数据库通过 DirectoryServices 完成所有操作。

Consider a .NET application that performs lots of configuration changes in IIS such as changing Virtual Directories or enabling compression. With IIS6 everything could be accomplished using the metabase through DirectoryServices.

但是在IIS7中,元数据库兼容性是可选的组件,所以我假设应该使用替代方法,以编程方式执行配置更改。这样做的正确方法是什么?我应该直接编辑 applicationHost.config 文件还是有推荐的API?

However in IIS7, the Metabase compatiblity is an optional component, so I'm assuming that alternative ways should be used in order to programmatically perform configuration changes. What's the right way of doing those? Should I directly edit the applicationHost.config file or is there a recommended API?

推荐答案

我相信 Microsoft.Web.Administration 有你想要的。

这篇关于如何以编程方式配置IIS7? (不使用Metabase)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆