我正在尝试设置我的网站设置项目的自动(每晚)安装。我可以在命令行上指定一些安装时值;特别是,添加 TARGETSITE
值定义我的新部署将转到的网站。
如何在 IIS7 安装中找到我的网站的元数据库密钥(例如“/LM/W3SVC/213548468”)? (我确实设置了 IIS6 兼容性,但在 metabase.xml 文件中找不到有关我的网站的任何内容。)
此外,由于 Web 部署设置项目显然是过时的机制(我猜它们太容易使用了?),有人对我的夜间自动化部署有更好的想法吗?
I'm trying to set up the automated (nightly) installation of my web site setup project. I can specify some install-time values on the command line; in particular, adding a TARGETSITE
value defines the web site to which my new deployment will go.
How do I find the metabase key to my web site (eg. "/LM/W3SVC/213548468") in an IIS7 installation? (I do have IIS6 compatibility all set up, but I can't find anything about my site in the metabase.xml file.)
Also, since the web deployment setup projects are obviously outdated mechanisms (I guess they were too easy to use?), does anyone have a better idea for my nightly automated deployments?
发布评论
评论(2)
在 IIS 7 及更高版本中,我们不再使用元数据库,而是移至“.config”模型,在该模型中我们将所有设置存储在“%windir%\system32\inetsrv\config\applicationHost.config”内,您将在其中存储查找您应用的所有信息和设置。如果您启用 IIS 6 兼容性,我们将通过将所有命令直接转换为新的 ApplicationHost.config 来运行它们。
如果您使用托管代码,最好的解决方案可能是使用 Microsoft.Web.Administration (链接),其中包含一个名为 ServerManager 的类,允许您设置所需的所有内容。
如果您使用脚本 (vbscript/jscript),您可以继续使用脚本或使用 AHADMIN,这是我们新的底层 COM 配置 api。
如果您使用 powershell,我们还有一个 PowerShell 提供程序 (http://www.iis.net/download/PowerShell )提供在这种情况下最好的。
另外,如果您确实想要打包内容和配置以及其他内容,例如注册表设置、COM 对象、GAC dll 等,您应该使用 Web 部署 (http://www.iis.net/download/WebDeploy)
In IIS 7 and above we do not use the metabase anymore and instead moved to a ".config" model where we store all the settings inside "%windir%\system32\inetsrv\config\applicationHost.config", that is where you will find all the information and settings you apply. If you enable IIS 6 compatibility we will run all the commands by translating them directly into the new ApplicationHost.config.
It would be useful to know more about how you are doing it today, If you use Managed code probably the best solution is using Microsoft.Web.Administration (Link) which includes a class called ServerManager to allow you to set everything you need.
If you use scripts (vbscript/jscript) you can continue using your scripts or instead use AHADMIN which is our new underlying COM configuration api.
if you use powershell we also have a PowerShell provider (http://www.iis.net/download/PowerShell) provide which should be the best in that case.
Also, if you actually want to package contents and configuration and other stuff like Registry settings, COM objects, GAC dlls, etc, you should use Web Deploy (http://www.iis.net/download/WebDeploy)
我对元数据库一无所知,但从你的帖子中我能够拼凑出以下内容:
反引号是 powershell 的转义字符。
I know nothing about metabase, but from your posts I was able to cobble together the following:
The backtick marks are the escape characters for powershell.