简体   繁体   English

使用Web Deploy的appHostConfig在IIS 6中创建网站

[英]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. 我在使用带有IIS 6的Web Deploy的appHostConfig提供程序时遇到问题。我没有在文档中看到任何内容,说我不能或者我需要安装额外的东西。

I know what I'm trying to do works in later versions of IIS. 我知道我想在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. 如果我在IIS 7.5(Windows 7)上运行以下命令,它将创建我可以在IIS管理器中看到的Default Web Site的副本。

"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: 但是,当我尝试在IIS 6(Windows 2003)上执行完全相同的操作时,我收到以下消息:

Error: Object of type 'appHostConfig' and path 'Default Web Site' cannot be created. 错误:无法创建“appHostConfig”类型的对象和“默认网站”路径。

Error: A command was issued that requires the IIS Configuration System but the system is not available. 错误:发出了一个需要IIS配置系统但系统不可用的命令。 Make sure you are using a version of IIS that contains the Configuration System. 确保您使用的是包含配置系统的IIS版本。

Can I do this in IIS 6, or do I need to do something differently? 我可以在IIS 6中执行此操作,还是需要以不同的方式执行某些操作?

You can't use appHostConfig in IIS6. 您不能在IIS6中使用appHostConfig。

appHostConfig works by directly syncing the applicationHost.config file which governs IIS7. appHostConfig的工作原理是直接同步管理IIS7的applicationHost.config文件。

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. 在IIS 6中,此功能是使用IIS Metabase而不是基于配置文件的系统实现的,因此提供程序无法直接复制。 (This is why you get that error about the 'configuration system') (这就是为什么你得到关于'配置系统'的错误)

For your example, you can likely use webServer60 provider to achieve the same. 对于您的示例,您可以使用webServer60提供程序来实现相同的功能。

For individual sites on IIS6 use the metakey, ie 对于IIS6上的各个站点,使用metakey,即

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

Note that on IIS6, it won't include the AppPool config by default. 请注意,在IIS6上,默认情况下它不会包含AppPool配置。 For that you'll need to ... 为此,你需要......

add: -enableLink:AppPoolExtension

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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