使用clickonce和iis部署winform应用程序失败

发布于 2024-10-18 14:29:20 字数 324 浏览 9 评论 0原文

我正在尝试使用 IIS 和 ClickOnce 部署 winform 应用程序。我可以访问publish.htm 页面,当我单击提供的链接时甚至会开始安装。 但是,我在安装过程中遇到此错误:

有人可以帮我解决这个问题吗?

谢谢, 布鲁诺

I'm trying to deploy a winform application with IIS and ClickOnce. I can access the publish.htm page and the install even starts when I click on the provided link.
However I get this error during the installation process:

Can anybody help me out on this ?

Thanks,
Bruno

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

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

发布评论

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

评论(2

自我难过 2024-10-25 14:29:20

我发现我需要检查“使用 .deploy 文件扩展名”(在属性>发布>选项>部署下

I found out that I needed to check "use .deploy file extension" (under properties>Publish>Options>Deployment

巷雨优美回忆 2024-10-25 14:29:20

[回答这个老问题,因为它在我的情况下是最好的匹配,而接受的答案对我来说没有用]。

背景,在 IIS 托管的 ClickOnce 方案中,可下载组件在部署根目录的清单文件中逐项列出(这就是您指定单个下载链接并部署所有支持组件的方式)。

我正在将经过测试的应用程序从 WiX 安装转换为使用 ClickOnce 的轻量级版本,并收到 HTTP 500 错误,日志中没有任何其他内容。当然,我没能想清楚,反而发现自己被拖进了互联网上的兔子洞,里面有详细的日志记录、魔法咒语等说明。

经过更清醒的思考,问题很简单,我应该能够分辨出来立即从 IIS 日志中得知:500 后跟 0 是“你是个白痴,内容不在你所说的位置”的简写,它与 ClickOnce 几乎没有任何关系。

我在 MVC 中复制/粘贴/编辑了一个现有的下载链接模板,该模板用于简单的应用程序,并且它恰好只满足清单中的两层子文件夹的需求。当我移植一个更复杂的项目结构时,我最终将项目留在了 Resources 子子文件夹中,这些项目在清单中看起来很好,但路径在 MVC 中被截断,因此无法找到相关项目。

这个故事的寓意是 - 如果您收到 500 错误,请务必先检查以确保您的无法正常工作的设备已插入工作插座...

[Answering this old question because it comes up as the best match in my case and the accepted answer was of no use to me].

Background, in an IIS hosted ClickOnce scenario, the downloadable components are itemized in a manifest file at the root of the deployment (that's how you can specify a single download link and deploy all the supporting components).

I was converting a tested application from a WiX installation to a lightweight version with ClickOnce and received the HTTP 500 error without anything else in the logs. Naturally, I failed to think it through and instead found myself getting dragged down the rabbit hole on the internets, with instructions for detailed logging, magic spells, etc.

Upon more sober reflection, the problem was simple and I should have been able to tell immediately from the IIS log: a 500 followed by a 0 is shorthand for 'you're an idiot, the content isn't where you said it was' and it had almost nothing to do with ClickOnce.

I had copy/paste/edited an existing download link template in MVC that was in use for simple apps and it happened to cater to only two levels of subfolders in the manifest. When I ported a more complex project structure, I ended up leaving items in a Resources sub-sub-subfolder that looked fine in the manifest but the path was being truncated in MVC so that the related item could not be found.

Moral of the story - if you get a 500 error always check first to make sure your non-functioning appliance is plugged into a working outlet...

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