加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

clickonce – “Manifest XML签名无效”在客户端机器上,但在开发

发布时间:2020-12-16 08:05:54 所属栏目:百科 来源:网络整理
导读:在工作中,我们有一个ClickOnce应用程序,当客户端尝试安装时,抛出异常: Exception reading manifest from file:/FILEPATH: the manifest may not be valid or the file could not be opened. Manifest XML signature is not valid. SignatureDescription
在工作中,我们有一个ClickOnce应用程序,当客户端尝试安装时,抛出异常:
  • Exception reading manifest from file:/FILEPATH: the manifest may not be valid or the file could not be opened.

    Manifest XML signature is not valid.

    SignatureDescription could not be created for the signature algorithm supplied.

为了解决这个问题,我们最终使用了另一个证书文件,它工作正常(清空清单)。

但是我们不能理解为什么它会在开发人员机器中安装应用程序(即使没有使用应用程序的开发人员),但是它不适用于客户机器?

我们没有很多关于如何创建证书或ClickOnce包的信息,因为执行它的人已经离开,没有留下相关文档。

所使用的证书没有密码,普通用户没有管理员权限。

从Stack Overflow问题Manifest XML signature is not valid,我可以猜测,问题可能是他们创建了项目和证书与.NET Framework 4.5,然后当他们设置应用程序运行与.NET Framework 4.0,他们没有改变签名算法。但是,我认为它不应该为开发人员工作。

任何洞察你可以给我将非常感谢。

更新:从Visual Studio 2013 Update 3修复。尝试从该版本的VS或更高版本发布您的应用程序。

上一个答案:

这是因为你的开发者机器安装了.NET 4.5,而你的客户机只安装了.NET 4.0。 .NET 4.0客户端机器无法读取清单,因为他们期望SHA-1,而.NET 4.5开发人员机器可以。

有关其他上下文,请参阅this blog post。

This change is due to the fact that we stopped using legacy certificates as default (SHA-1) in NetFX4.5 to sign manifest and instead,use newer version (SHA-256),which is not recognized by NetFx4.0 runtime. Therefore,while parsing the manifest,4.0 runtime complains of an invalid manifest. For legacy frameworks,when we try to run a ClickOnce app on a box that does not have targeted runtime,ClickOnce pops up a message to user saying “you need xxxx.xx runtime to run this app”. But starting .NET 4.5,if a 4.5 ClickOnce app is run on the box with only .NET 4.0 installed,the message complains about an invalid manifest. In order to resolve the issue,you must install .Net Framework 4.5 on the target system.

尝试使用SHA-1证书而不是SHA-2证书签署清单。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读