Web 安装项目无法安装动态数据站点:“安装程序已中断”
安装程序的最后一个阶段失败并显示以下消息:
安装未完成
安装程序在安装 [项目] 之前被中断。您需要重新启动安装程序才能重试。
运行 msiexec /i installer.msi /l*vx setup.log
会在安装日志中显示以下条目:
INFO : [...] [ApplyWebFolderProperties]: Getting web folder property token... INFO : [...] [ApplyWebFolderProperties]: Token is '/LM/W3SVC/1/ROOT/ProjectDir/DynamicData/Filters'. INFO : [...] [ApplyWebFolderProperties]: Getting METADATA_HANDLE for the directory '/LM/W3SVC/1/ROOT/ProjectDir/DynamicData/Filters'. ERROR : [...] [ApplyWebFolderProperties]: FAILED: -2147024893 ERROR : [...] [ApplyWebFolderProperties]: FAILED: -2147024893 ERROR : [...] [ApplyWebFolderProperties]: Custom Action failed with code: '3' ERROR : [...] [ApplyWebFolderProperties]: Custom Action failed with code: '3' INFO : [...] [ApplyWebFolderProperties]: Custom Action completed with return code: '3'
之前使用 Web 安装项目安装相同的 Web 应用程序没有任何问题。将 Web 应用程序从 .NET 3.5 SP1 升级到 .NET 4.0 后,问题开始出现。
The last phase of the installer fails with this message:
Installation Incomplete
The installer was interrupted before [project] could be installed. You need to restart the installer to try again.
Running msiexec /i installer.msi /l*vx setup.log
shows the following entries in the setup log:
INFO : [...] [ApplyWebFolderProperties]: Getting web folder property token... INFO : [...] [ApplyWebFolderProperties]: Token is '/LM/W3SVC/1/ROOT/ProjectDir/DynamicData/Filters'. INFO : [...] [ApplyWebFolderProperties]: Getting METADATA_HANDLE for the directory '/LM/W3SVC/1/ROOT/ProjectDir/DynamicData/Filters'. ERROR : [...] [ApplyWebFolderProperties]: FAILED: -2147024893 ERROR : [...] [ApplyWebFolderProperties]: FAILED: -2147024893 ERROR : [...] [ApplyWebFolderProperties]: Custom Action failed with code: '3' ERROR : [...] [ApplyWebFolderProperties]: Custom Action failed with code: '3' INFO : [...] [ApplyWebFolderProperties]: Custom Action completed with return code: '3'
The same web application had no problems being installed with a web setup project before. The issue started after upgrading the web application from .NET 3.5 SP1 to .NET 4.0.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此博客条目指出了该问题:
(强调我的)
不幸的是,过滤器是动态数据中的硬编码文件夹名称。如果您查看FilterFactory,没有'似乎有任何方法可以覆盖该值,看看 MetaModel 未标记为虚拟。如果我们无法更改文件夹名称,那么我们必须考虑修复安装程序...
安装程序错误是由 ApplyWebFolderProperties 自定义操作引发的。该操作不是内置于 Windows Installer 中的,而是由 Web 安装项目添加的。这很有帮助,因为这意味着我们可以使用 删除它WiRunSQL.vbs:
请注意,ApplyWebFolderProperties 的实际名称是
WEBCA_ApplyWebFolderProperties
。鉴于该行动似乎没有在任何地方记录,买者自负。但它似乎并不太重要。要自动化解决方法,您可以将命令添加到安装项目的 PostBuildEvent 中,如下所示:
如果有人知道安装名为 Filters 的文件夹的更好方法,我很乐意听到它。
This blog entry points out the issue:
(Emphasis mine)
Unfortunately, Filters is a hard-coded folder name in Dynamic Data. If you look at FilterFactory, there doesn't appear to be any way to override that value, seeing as how the FilterFactory property of MetaModel is not marked virtual. If we can't change the folder name, then we have to look at fixing the installer...
The installer error is being raised by the ApplyWebFolderProperties custom action. That action isn't built-in to Windows Installer—it's added by the Web Setup Project. That's helpful, because it means we can remove it with WiRunSQL.vbs:
Note that the actual name of ApplyWebFolderProperties is
WEBCA_ApplyWebFolderProperties
. Seeing as how the action doesn't appear to be documented anywhere, caveat emptor. It doesn't appear to be too terribly important though.To automate the workaround, you could add the command to the setup project's PostBuildEvent like so:
If anyone knows a better way to install a folder named Filters, I'd love to hear it.