简体   繁体   中英

Using Web Deploy's appHostConfig to create web site in IIS 6

I'm having trouble using Web Deploy's appHostConfig provider with IIS 6. I don't see anything in the documentation saying I can't or that I need to install anything extra.

I know what I'm trying to do works in later versions of IIS. If I run the command below on IIS 7.5 (Windows 7), it creates a copy of the Default Web Site that I can see in IIS Manager.

"C:\Program Files (x86)\IIS\Microsoft Web Deploy V2\msdeploy.exe"
    -verb:sync
    -source:apphostconfig="Default Web Site"
    -dest:apphostconfig="Created from command line"

However, when I try to do the exact same thing on IIS 6 (Windows 2003), I get this message:

Error: Object of type 'appHostConfig' and path 'Default Web Site' cannot be created.

Error: A command was issued that requires the IIS Configuration System but the system is not available. Make sure you are using a version of IIS that contains the Configuration System.

Can I do this in IIS 6, or do I need to do something differently?

You can't use appHostConfig in IIS6.

appHostConfig works by directly syncing the applicationHost.config file which governs IIS7.

In IIS 6, this functionality was implemented using the IIS Metabase, instead of a config file based system, so there is no counterpart that the provider can directly copy. (This is why you get that error about the 'configuration system')

For your example, you can likely use webServer60 provider to achieve the same.

For individual sites on IIS6 use the metakey, ie

-source:metakey path="lm/w3svc/71913498"

Note that on IIS6, it won't include the AppPool config by default. For that you'll need to ...

add: -enableLink:AppPoolExtension

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM