将网站从 IIS7 移至 IIS 7.5

发布于 2024-08-15 16:27:46 字数 320 浏览 2 评论 0原文

任何人都可以建议将带有 IIS7 的服务器 1 上的网站移动到带有 IIS 7.5 的服务器 2 上的最佳方法吗?我读过一些文章,建议在保留 configProtectedData 节点的同时复制 applicationHost.config 文件,但我担心 IIS 7.5 配置中可能存在当前 IIS7 配置中不存在的设置,这些设置将会丢失。

我还看到了使用如下命令单独移动每个站点的建议: AppCmd.exe 列出站点“我的站点”/config /XML > mysite.xml

对于数十个站点,此方法需要很长时间才能执行此操作。必须有一种更好的方法将所有站点一次性迁移到新平台。

Can anyone suggest the best way of moving websites on server1 with IIS7 to server2 with IIS 7.5 on it? I've read some articles which suggest copying the applicationHost.config file while preserving the configProtectedData node, but I'm concerned there may be settings in the IIS 7.5 config that don't exist in the current IIS7 config which would be lost.

I've also seen suggestions of moving each site individually by using a command like this:
AppCmd.exe LIST SITE "My Site" /config /XML > mysite.xml

This method just takes too long to do this for dozens of sites. There must be a better way of moving all the sites at once to the new platform.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

雨后彩虹 2024-08-22 16:27:46

我想我找到了最适合我的解决方案。您需要从 BOTH 7.0 和 7.5 服务器导出共享配置。将导出的 7.0 文件复制到 7.5 服务器上的临时目录。在 7.5 服务器上,将导出的 7.5 Administration.config 文件复制到 7.0 文件的顶部,从而替换它。在 IIS 7.5 中,将共享配置指向临时目录。这里的要点是使用新服务器中的 Administration.config,而不是 7.0 服务器中的。从那时起,我就一直工作得很好。问题似乎源于此文件中的节点 moduleProviders。它们都是来自 IIS 7 的文件中的版本 7.0.0.0,这是 IIS 7.5 不喜欢的。

I think I found the solution that worked best for me. You need to export the shared configuration from BOTH 7.0 and 7.5 servers. Copy the exported 7.0 files to a temp directory on the 7.5 server. On the 7.5 server, copy the exported 7.5 administration.config file over the top of the 7.0 file, thereby replacing it. In IIS 7.5, point your shared configuration to the temporary directory. The point here is to use the administration.config from the new server and not from the 7.0 server. Been working great for me since. The problem seems to stem from the node moduleProviders in this file. They are all version 7.0.0.0 in the file from IIS 7, which IIS 7.5 does not like.

怪我太投入 2024-08-22 16:27:46

使用 Web 部署可能是最简单的方法之一,您可以直接对实时服务器执行此操作,也可以对离线包(zip 文件)执行此操作,然后随时应用。
下载地址: http://www.iis.net/download/WebDeploy

简单的命令行,例如:

msdeploy.exe -verb:sync -source:apphostconfig="Default Web Site" -dest:apphostconfig="Default Web Site",computername=Server2 -whatif

-whatif 告诉它只告诉它会创建的差异,如果删除它,它会将所有更改应用于同步(如果不存在,则会创建它)。

示例: http://learn.iis.net/page.aspx /446/synchronize-iis-7/

这很酷,因为它还可以带来内容文件、COM 对象、GAC 中的程序集、注册表项、证书、ssl 绑定等。

Using Web Deploy is probably one of the simplest ways, you can do that directly to the live server, or you could do it to an offline package (zip file) and then apply at any time.
Download at: http://www.iis.net/download/WebDeploy

Simple command line like:

msdeploy.exe -verb:sync -source:apphostconfig="Default Web Site" -dest:apphostconfig="Default Web Site",computername=Server2 -whatif

-whatif tells it to just tell the differences that it would create, and If you remove it, it will apply all the changes to sync (if it does not exist it will create it).

Sample: http://learn.iis.net/page.aspx/446/synchronize-iis-7/

this is cool because it can bring also content files, COM objects, Assemblies in the GAC, registry keys, certificates, ssl bindings and more.

谎言月老 2024-08-22 16:27:46

实际上,您可以复制粘贴除 部分之外的完整 appHost.config 文件。使用windiff比较两个appHost.config,然后移动缺少的...

希望这有帮助。

You can actually copy paste the complete appHost.config file except the <configProtectedData> section. Use windiff to compare the two appHost.config and then move the ones that are missing...

Hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文