zoukankan      html  css  js  c++  java
  • Manifest XML signature is not valid(安装ClickOnce签名未通过验证)

    转载:http://stackoverflow.com/questions/12826798/manifest-xml-signature-is-not-valid

    安装时,我的问题:

     PLATFORM VERSION INFO
    Windows  : 5.2.3790.131072 (Win32NT)
    Common Language Runtime  : 4.0.30319.1
    System.Deployment.dll  : 4.0.30319.1 (RTMRel.030319-0100)
    clr.dll  : 4.0.30319.1 (RTMRel.030319-0100)
    dfdll.dll  : 4.0.30319.1 (RTMRel.030319-0100)
    dfshim.dll  : 4.0.31106.0 (Main.031106-0000)

    SOURCES
    Deployment url : file:///E:/TlsMsg/TlsMsg.application

    ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of E:TlsMsgTlsMsg.application resulted in exception. Following failure messages were detected:
    + Exception reading manifest from file:///E:/TlsMsg/TlsMsg.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.

    OPERATION PROGRESS STATUS
    * [2014-3-7 10:41:06] : Activation of E:TlsMsgTlsMsg.application has started.

    ERROR DETAILS
    Following errors were detected during this operation.
    * [2014-3-7 10:41:06] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
    - Exception reading manifest from file:///E:/TlsMsg/TlsMsg.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.CheckSignature(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.
    =======解决方法====================================================

    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

    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'

    =======说明=======================================================

    意思是 把项目从Framework 4.5转化为Framework 4.0或3.5后,ClickOnce清单签名失效。

    解决方法是  打开项目属性 -> 签名 。点击‘创建测试证书’。

    此时签名算法将由SHA-256转变为sha1rsa

  • 相关阅读:
    tomcat报错:java.io.IOException: 您的主机中的软件中止了一个已建立的连接。
    mysql 的 case when 用法
    分享几个能用的 editplus 注册码
    windows 时间同步至最新时间方法 | windows 时间同步服务器
    tomcat 如何登录 Server Status、Manager App、Host Manager
    Eclipse将java项目导出可执行的jar文件
    Java 中将字符串与 unicode 相互转换的工具类
    解决Lost connection to MySQL server during query错误方法
    gt,gte,lt,lte缩写的含义
    python 打印调用栈
  • 原文地址:https://www.cnblogs.com/senyier/p/3591448.html
Copyright © 2011-2022 走看看