使用 Web 部署部署 IIS 设置
如果我在 Visual Studio 2010 中查看 Web 应用程序的打包/发布设置,会看到一个选项“包含 IIS 管理器中配置的所有 IIS 设置(仅用于 IIS Web 项目)”
我正在使用 IIS 而不是 VS Dev Server 来运行我的 Web 应用程序,但是当我将 Web Deploy 创建的包部署到远程服务器时,应用于我的远程 IIS 应用程序的 IIS 设置至少是不熟悉的,最坏的是完全错误的。
例如,我的本地 IIS 有 2 个虚拟目录(图像、声音)。但是当我部署时,它会创建 4 个完全不同的虚拟目录(_controltemplates、_layouts、_vti_bin、_wpresources),如果我事先在远程服务器上手动创建 2 个正确的虚拟目录,Web Deploy 将删除它们。 Web Deploy 到底从哪里得到这些? Web 部署还在远程 IIS 应用程序上错误应用了正确的身份验证设置。
由于“包含 IIS 管理器中配置的所有 IIS 设置”设置似乎没有选择正确的设置,因此我最终希望能够创建某种配置文件,Web 部署将使用该文件作为其部署包的一部分。理想情况下,我可以检查源代码控制。但我无法从文档中弄清楚如何做到这一点。我看到一些有关参数化和清单的内容,但我不太明白。
If I look at the Package/Publish Settings of a web application in Visual Studio 2010, there is an option to "Include all IIS settings as configured in IIS Manager (used only for IIS Web projects)"
I am using IIS instead of the VS Dev Server to run my web application, but when I deploy the package that Web Deploy creates to a remote server, the IIS settings that get applied to my remote IIS application are at the least, unfamiliar, and at the worst, completely wrong.
For instance, my local IIS has 2 virtual directories (images, sounds). But when I deploy, it creates 4 completely different virtual directories (_controltemplates, _layouts, _vti_bin, _wpresources), and if I manually create the 2 correct vdirs on the remote server beforehand, Web Deploy will delete them. Where the heck did Web Deploy get those from? Web Deploy also mis-applied the correct authentication settings on the remote IIS application.
Since the "Include all IIS settings as configured in IIS Manager" setting doesn't seem to pick up the right settings, I ultimately want to be able to create some kind of configuration file that Web Deploy will use as part of its deploy package. Ideally something that I can check into source control. But I can't figure out from the documentation how to do this. I see something about parameterization and manifests, but I can't quite figure it out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是另一篇文章,可以看一下。请参阅有关 IIS 配置的说明,并非所有设置都会被继承,请检查默认网站上的 Windows 身份验证是否设置为 true。
打包/发布 Web 选项卡,项目属性
http://msdn.microsoft.com/en-us/library/dd410108.aspx
Here is another article to look at. See the note about IIS Configuration, not all settings will be inherited, check if Windows authentication is set to true on the default web site.
Package/Publish Web Tab, Project Properties
http://msdn.microsoft.com/en-us/library/dd410108.aspx