将IIS设置从一台计算机复制到另一台计算机

时间:2022-12-27 10:21:09

Looked for an answer to this and didn't see it.

寻找答案,并没有看到它。

This is for IIS 6.0 / Windows Server 2003.

这适用于IIS 6.0 / Windows Server 2003。

I'm working with an extremely large ASP/ASP.NET application and I'm trying to get my development environment to match my team members environment. This process is basically trial and error: get an error, go into IIS, make a change, hope the error is fixed. Ugh. I'm hoping to find a way to replicate a set of IIS directories and their configurations on one machine onto my machine.

我正在使用一个非常大的ASP / ASP.NET应用程序,我正在尝试使我的开发环境与我的团队成员环境相匹配。这个过程基本上是试错:得到错误,进入IIS,进行更改,希望错误得到修复。啊。我希望找到一种方法将一组IIS目录及其配置复制到我的机器上。

I did find a script that will iterate through and give me a list of all virtual directories on a machine. It helped, but not a lot since I still have to go in and set up all those virtual directories (I think there are like 20 of them ballpark). The whole process is complicated by the fact that we're mixing ASP and ASP.NET applications in the same application which spans many solutions and projects. Getting the whole thing up and going seems like way too much work but I've never heard of a real solution to this.

我确实找到了一个脚本,它将迭代并给我一个机器上所有虚拟目录的列表。它有所帮助,但不是很多,因为我仍然需要进入并设置所有这些虚拟目录(我认为它们中有20个是棒球场)。整个过程很复杂,因为我们将ASP和ASP.NET应用程序混合在同一个应用程序中,该应用程序跨越了许多解决方案和项目。让整个事情发展起来似乎太过分了,但我从来没有听说过真正的解决方案。

Would Powershell be helpful here?

Powershell会在这方面有所帮助吗?

2 个解决方案

#1


You should export and import IIS metabase.

您应该导出和导入IIS元数据库。

These might help:

这可能有所帮助:

Fortunately, in IIS7, ASP.NET config is integrated with IIS config so the job is done by copying Web.config.

幸运的是,在IIS7中,ASP.NET配置与IIS配置集成,因此通过复制Web.config完成作业。

#2


Here's Microsofts' documentation for iiscnfg. iiscnfg documentation

这是微软的iiscnfg文档。 iiscnfg文档

When I ran it the first time, I got an error that said "This script does not work with WScript." If that happens to you:

当我第一次运行它时,我收到一条错误,上面写着“此脚本无法与WScript一起使用”。如果发生这种情况:

1. Click OK.
2. At the "Would you like to register Cscript as your default host for VBscript?" click Yes.
3. At "Successfully registered Cscript" click OK.
4. Run the command again

#1


You should export and import IIS metabase.

您应该导出和导入IIS元数据库。

These might help:

这可能有所帮助:

Fortunately, in IIS7, ASP.NET config is integrated with IIS config so the job is done by copying Web.config.

幸运的是,在IIS7中,ASP.NET配置与IIS配置集成,因此通过复制Web.config完成作业。

#2


Here's Microsofts' documentation for iiscnfg. iiscnfg documentation

这是微软的iiscnfg文档。 iiscnfg文档

When I ran it the first time, I got an error that said "This script does not work with WScript." If that happens to you:

当我第一次运行它时,我收到一条错误,上面写着“此脚本无法与WScript一起使用”。如果发生这种情况:

1. Click OK.
2. At the "Would you like to register Cscript as your default host for VBscript?" click Yes.
3. At "Successfully registered Cscript" click OK.
4. Run the command again