Web 安装项目无法安装动态数据站点:“安装程序已中断”

发布于 2024-10-13 09:32:16 字数 1013 浏览 14 评论 0原文

安装程序的最后一个阶段失败并显示以下消息:

安装未完成

安装程序在安装 [项目] 之前被中断。您需要重新启动安装程序才能重试。

运行 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 技术交流群。

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

发布评论

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

评论(1

他是夢罘是命 2024-10-20 09:32:16

此博客条目指出了该问题:

这让我开始思考,我已经
名为filters的子文件夹。改变
除了重命名过滤器之外别无他法
子文件夹使其正确完成。我是
假设你可能有同样的
名为 apppools 的文件夹出现问题,
信息,或 1。

(强调我的)

不幸的是,过滤器是动态数据中的硬编码文件夹名称。如果您查看FilterFactory,没有'似乎有任何方法可以覆盖该值,看看 MetaModel 未标记为虚拟。如果我们无法更改文件夹名称,那么我们必须考虑修复安装程序...

安装程序错误是由 ApplyWebFolderProperties 自定义操作引发的。该操作不是内置于 Windows Installer 中的,而是由 Web 安装项目添加的。这很有帮助,因为这意味着我们可以使用 删除它WiRunSQL.vbs

cscript WiRunSQL.vbs installer.msi "DELETE FROM CustomAction WHERE Action='WEBCA_ApplyWebFolderProperties'" 

请注意,ApplyWebFolderProperties 的实际名称是 WEBCA_ApplyWebFolderProperties。鉴于该行动似乎没有在任何地方记录,买者自负。但它似乎并不太重要。

要自动化解决方法,您可以将命令添加到安装项目的 PostBuildEvent 中,如下所示:

cscript.exe "$(ProjectDir)..\WiRunSQL.vbs" "$(BuiltOuputPath)" "DELETE FROM CustomAction WHERE Action='WEBCA_ApplyWebFolderProperties'"

如果有人知道安装名为 Filters 的文件夹的更好方法,我很乐意听到它。

This blog entry points out the issue:

Which got me started thinking, I have
a subfolder named filters. Changing
nothing else but renaming the filters
subfolder made it finish properly. I'm
assuming you might have the same
problems with folders named apppools,
info, or 1 as well.

(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:

cscript WiRunSQL.vbs installer.msi "DELETE FROM CustomAction WHERE Action='WEBCA_ApplyWebFolderProperties'" 

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:

cscript.exe "$(ProjectDir)..\WiRunSQL.vbs" "$(BuiltOuputPath)" "DELETE FROM CustomAction WHERE Action='WEBCA_ApplyWebFolderProperties'"

If anyone knows a better way to install a folder named Filters, I'd love to hear it.

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