Where is the metabase key for my IIS7 web site?

北城以北 提交于 2019-12-05 23:10:27

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 (http://blogs.msdn.com/b/carlosag/archive/2006/04/17/microsoftwebadministration.aspx) 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)

I know nothing about metabase, but from your posts I was able to cobble together the following:

import-module WebAdministration
$site = get-website | Where-object {$_.Name -eq "SiteName"}

$id=$site.ID

setup.msi /passive TARGETAPPPOOL=`"ASP.NET v4.0`" TARGETSITE="/LM/W3SVC/"$id

The backtick marks are the escape characters for powershell.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!