"清单XML签名是无效" [英] "Manifest XML signature is not valid"

查看:394
本文介绍了"清单XML签名是无效"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

操作系统:Windows 7使用Visual Studio 2012专业版与.NET 4.5安装64位

OS: Windows 7 64 bit using Visual Studio Pro 2012 with .NET 4.5 installed.

我用视觉工作室中的发布选项,并确保我点击了签署的ClickOnce清单,并签署大会。它仍然不会在另一台计算机上运行,​​并说我没有一个有效的XML签名。我已经粘贴了以下错误消息。

I used the Publish option within Visual Studios and ensured that I had clicked the Sign the clickOnce manifest and Sign the Assembly. It will still not run on another computer and says I do not have a valid XML signature. I have pasted the error message below.

我也看过:的如何移动一个ClickOnce部署包难道我要我签字的ClickOnce清单?异常读数从清单文件:清单可能无效,或者文件无法打开和其他几个人。

I have also read: How to move a ClickOnce deployment package, Do I have to sign my ClickOnce manifest?. Exception reading manifest from file: the manifest may not be valid or the file could not be opened and several others.

我需要能够在最小的.NET 4.0部署我的计划,我没有获得视觉工作室的另一个版本。 !在此先感谢

I need to be able to deploy my program on .NET 4.0 at the minimum and I do not have access to another version of Visual Studios. Thanks in Advance!

完整的错误如下图:

平台版本信息
的Windows:5.1.2600.196608(Win32NT)
公共语言运行库:2.0.50727.3603
System.Deployment.dll:2.0.50727.3053(netfxsp.050727-3000)
mscorwks .dll文件:2.0.50727.3603(GDR.050727-3600)
dfdll.dll:2.0.50727.3053(netfxsp.050727-3000)
dfshim.dll:4.0.31106.0(Main.031106-0000)

PLATFORM VERSION INFO Windows : 5.1.2600.196608 (Win32NT) Common Language Runtime : 2.0.50727.3603 System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000) mscorwks.dll : 2.0.50727.3603 (GDR.050727-3600) dfdll.dll : 2.0.50727.3053 (netfxsp.050727-3000) dfshim.dll : 4.0.31106.0 (Main.031106-0000)

来源
部署URL:文件:/// C:/Documents%20and%20Settings/Administrator/Desktop/EatonWizard.application

SOURCES Deployment url : file:///C:/Documents%20and%20Settings/Administrator/Desktop/EatonWizard.application

错误摘要
以下是错误的摘要,这些错误的详细信息在日志中后面列出。的C
*激活:\Documents和Settings\Administrator\Desktop\EatonWizard.application导致异常。检测到下列失败消息:
+异常阅读清单从文件:/// C:/Documents%20and%20Settings/Administrator/Desktop/EatonWizard.application:清单可能无效,或者文件无法打开。
+清单XML签名无效。
+ SignatureDescription不能对提供的签名算法创建。

ERROR SUMMARY Below is a summary of the errors, details of these errors are listed later in the log. * Activation of C:\Documents and Settings\Administrator\Desktop\EatonWizard.application resulted in exception. Following failure messages were detected: + Exception reading manifest from file:///C:/Documents%20and%20Settings/Administrator/Desktop/EatonWizard.application: 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.

检测组件存储事务失败摘要
到任何事务错误。

COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was detected.

警告
有此操作过程中没有任何警告。

WARNINGS There were no warnings during this operation.

操作进度状态
* [10 /二千零十二分之十下午2时05分02秒]的C活化:\Documents和Settings\Administrator\Desktop\EatonWizard.application已启动

OPERATION PROGRESS STATUS * [10/10/2012 2:05:02 PM] : Activation of C:\Documents and Settings\Administrator\Desktop\EatonWizard.application has started.

错误此操作过程中检测到细节
以下错误。
* [二〇一二年十月一十日下午2时05分02秒] System.Deployment.Application.InvalidDeploymentException(ManifestParse)
- 异常读取文件清单:/// C:/文件%20于是%20Settings /Administrator/Desktop/EatonWizard.application:清单可能无效,或者文件无法打开。
- 资料来源:System.Deployment
- 堆栈跟踪:
在System.Deployment.Application.ManifestReader.FromDocument(字符串的localPath,ManifestType manifestType,乌里sourceUri)
在System.Deployment .Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore,乌里和放大器; sourceUri,临时文件和放大器;临时文件,SubscriptionState&安培;子状态,IDownloadNotification通知,DownloadOptions选项,serverInformation&安培; serverInformation)
在System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore,乌里&安培; sourceUri,临时文件和放大器;临时文件,SubscriptionState&安培;子状态,IDownloadNotification通知,DownloadOptions选项)
在System.Deployment.Application.ApplicationActivator.PerformDeploymentActivati​​on(URI activati​​onUri,布尔isShortcut,字符串textualSubId,字符串deploymentProviderUrlFromExtension,BrowserSettings browserSettings,字符串&安培; errorPageUrl)
在System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(对象状态)
---内部异常---
System.Deployment.Application.InvalidDeploymentException(SignatureValidation)
- 清单XML签名无效。
- 资料来源:System.Deployment
- 堆栈跟踪:
在System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(流S)
在System.Deployment.Application.ManifestReader .FromDocument(字符串的localPath,manifestType manifestType,乌里sourceUri)
---内部异常---
System.Security.Cryptography.CryptographicException
- SignatureDescription不能对提供的签名算法创建。
- 资料来源:System.Security
- 堆栈跟踪:
在System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm键)
在System.Security.Cryptography.Xml .SignedXml.CheckSignatureReturningKey(AsymmetricAlgorithm&安培; signingKey)
在System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
在System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(流S)

ERROR DETAILS Following errors were detected during this operation. * [10/10/2012 2:05:02 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse) - Exception reading manifest from file:///C:/Documents%20and%20Settings/Administrator/Desktop/EatonWizard.application: the manifest may not be valid or the file could not be opened. - Source: System.Deployment - Stack trace: at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri) at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestDirectBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options, ServerInformation& serverInformation) at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options) at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state) --- Inner Exception --- System.Deployment.Application.InvalidDeploymentException (SignatureValidation) - Manifest XML signature is not valid. - Source: System.Deployment - Stack trace: at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s) at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri) --- Inner Exception --- System.Security.Cryptography.CryptographicException - SignatureDescription could not be created for the signature algorithm supplied. - Source: System.Security - Stack trace: at System.Security.Cryptography.Xml.SignedXml.CheckSignedInfo(AsymmetricAlgorithm key) at System.Security.Cryptography.Xml.SignedXml.CheckSignatureReturningKey(AsymmetricAlgorithm& signingKey) at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags) at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)

组件存储交易明细
无交易信息是可用的。

COMPONENT STORE TRANSACTION DETAILS No transaction information is available.

推荐答案

今天我有同样的问题。这是我如何解决:

I had the same problem today. This is how I solved:

是什么造成了这个问题:
我们创建使用vs2012和框架4.5的ClickOnce项目。
然后,我们改变了目标框架4.0(客户要求)

What caused the problem: We created a clickonce project using vs2012 and framework 4.5. Then we changed the target framework to 4.0 (client asked to).

现在的问题是:框架4.5使用SHA-256算法的签名,和4.0使用SHA-1。当我们改变了目标框架4.0和vs2012没有改变算法

The problem is: Framework 4.5 uses SHA-256 algorithm for the signature, and 4.0 uses SHA-1. When we changed the target framework to 4.0 and vs2012 didn't changed the algorithm.

解决方法:手动更改算法,生成一个新的证书。

Solution: Change the algorithm manually, generating a new certificate.

转到项目属性 - >签署

Go to Project properties -> signing

您将看到在签名算法使用的算法。您可以创建一个新的测试证书,然后你会发现,它更改为sha1RSA

You will see the algorithm that is being used in 'Signature Algorithm'. You can create a new test certificate and then you will notice that it changes to 'sha1RSA'

这篇关于"清单XML签名是无效"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆