IIS 6.0的网站自动创建 [英] Automated creation of IIS 6.0 websites

查看:137
本文介绍了IIS 6.0的网站自动创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们必须承载每个多个应用程序在其自带的IIS网站的Web应用程序门户。所以每次我们采用另外一台机器来运行我们的code,无论是开发者的工作站或服务器,我们必须manully创建的所有网站的每一个我们的应用程序,(当然名单只是不断增长)的。有没有一个API调用来创建一个IIS网站,这样我就可以存储所有必要的信息在一个数据库表,然后写一个WinForms程序,将检查表,并自动为每个记录中的一个IIS网站?

We have web application portal that hosts multiple applications each in with its own IIS Website. So each time we adopt another machine to run our code, either developer workstation, or server, we have to manully create all of the websites for each of our applications, (and of course the list just keeps on growing). Is there an API call to create an IIS website, so that I could store all the necessary info in a database table and then write a winforms program that would check the table, and automagically create one IIS website for each record?

推荐答案

如果你想这样做的一个WinForms /控制台应用程序,那么我强烈建议在看的System.DirectoryServices 命名空间。

If you wanted to do this in a WinForms/Console application then I'd highly recommend looking at the System.DirectoryServices namespace.

有一些好的文档在这里:

There's some good documentation here:

使用的System.DirectoryServices配置IIS(MSDN)

例如,创建网站和虚拟目录:

For example, to create sites and virtual directories:

创建站点和虚拟目录使用的System.DirectoryServices(MSDN)

的System.DirectoryServices 命名空间是围绕ADSI API的是,各种IIS管理脚本使用托管包装。

The System.DirectoryServices namespace is a managed wrapper around the ADSI API's that the various IIS administration scripts use.

有关的各种配置数据库属性的详细信息,你会遇到我推荐这个参考:

For more information on the various metabase properties you'll encounter I recommend this reference:

IIS元数据库属性(MSDN)

如果或当你移动到IIS7那么我建议采取一看 Microsoft.Web.Administration 命名空间和 APPCMD 工具。

If or when you move onto IIS7 then I recommend taking a look at the Microsoft.Web.Administration namespace and the APPCMD tool.

这篇关于IIS 6.0的网站自动创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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