在Windows XP上部署ClickOnce

时间:2013-03-14 10:18:06

标签: c# visual-studio windows-xp clickonce

我正在尝试在干净的Windows XP计算机上安装我的C#应用​​程序。该程序需要.NET Framework 3.5,因此我在prerequisites中添加了该程序。该应用程序在Windows 7计算机上运行得非常好,但在Windows XP中失败并且出现以下错误:

ERROR DETAILS
    Following errors were detected during this operation.
    * [3/14/2013 11:11:26 AM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
        - Exception reading manifest from file://tsclient/D/publish/Application%20Files/LivePigeonClient_1_0_0_16/LivePigeonClient.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)

InvalidDeploymentException (SignatureValidation)

是什么导致了这个问题?

应用程序清单

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2">
  <assemblyIdentity name="LivePigeonClient.application" version="1.0.0.16" publicKeyToken="9c18f07266746296" language="neutral" processorArchitecture="x86" xmlns="urn:schemas-microsoft-com:asm.v1" />
  <description asmv2:publisher="LivePigeonClient" asmv2:product="LivePigeonClient" xmlns="urn:schemas-microsoft-com:asm.v1" />
  <deployment install="true" mapFileExtensions="true" co.v1:createDesktopShortcut="true">
    <deploymentProvider codebase="http://nb-stage/LivePigeonClient/LivePigeonClient.application" />
  </deployment>
  <dependency>
    <dependentAssembly dependencyType="install" codebase="Application Files\LivePigeonClient_1_0_0_16\LivePigeonClient.exe.manifest" size="19770">
      <assemblyIdentity name="LivePigeonClient.exe" version="1.0.0.16" publicKeyToken="9c18f07266746296" language="neutral" processorArchitecture="x86" type="win32" />
      <hash>
        <dsig:Transforms>
          <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
        </dsig:Transforms>
        <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
        <dsig:DigestValue>YcOGziTuwXQ5l5/mkvEF3puhg/M=</dsig:DigestValue>
      </hash>
    </dependentAssembly>
  </dependency>
<publisherIdentity name="CN=VANHULTEN\max" issuerKeyHash="ba68cf2261b7dec8653727cbceeb3f0f3817bb37" /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>aYws5APsQnYt1TNpwaT6ZcoySBiM+HBSH7d0l8/FEmE=</DigestValue></Reference></SignedInfo><SignatureValue>vm7Tjd/SFZK0WT1YGgEqWP6QOgJ3U26D/+32LrxmjMysNlfuJ21MjAmjiP3Hcd4fuDX6QJ7ctH4+Vrlx+kXrrfnVcceBbhAAph4uosfo8qKpwCHbfp/J0leQ3DzT61Sd4EE//wZW6qJcpgW8qqn/id7AH/jAcCbrpOIufLXc7yU=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>wj4ZM4ud3sPlAxopNQiYHeg4fg+3TSEHWIWrjNV47F3KePb+nOtYblz7nEzplq5HPmX5gyoauqpmelyB453l5N6Hd6WfHuyZpQB6ESxVuiI9XS3L/WXMrazRj2EeExnpEdslVJx32lInreg/rwDHz59fOP1G+hKnzgoO8ViAgGU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="6112c5cf9774b71f5270f88c184832ca65faa4c16933d52d7642ec03e42c8c69" Description="" Url=""><as:assemblyIdentity name="LivePigeonClient.application" version="1.0.0.16" publicKeyToken="9c18f07266746296" language="neutral" processorArchitecture="x86" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=VANHULTEN\max</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>CdT1rv1rwUXqtJn0L3bDBoocdBFyTmyn0kcJMsw0Ioo=</DigestValue></Reference></SignedInfo><SignatureValue>d/fsB1cfPn+29iEB3ltgkoQ4HE2T/wxQzJAhKIxCDM6oZLjNnvATM2stOvWs8nvdINFQEtef19aMjaYIAu9E00oncYvy+Sxv+qtNM2AEpTkRKQTrWHCR7DymiK4JPRmT+ixKwNCWwxMIl6LL/12f7o57COd+5cM1+FfgC6ew5TU=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>wj4ZM4ud3sPlAxopNQiYHeg4fg+3TSEHWIWrjNV47F3KePb+nOtYblz7nEzplq5HPmX5gyoauqpmelyB453l5N6Hd6WfHuyZpQB6ESxVuiI9XS3L/WXMrazRj2EeExnpEdslVJx32lInreg/rwDHz59fOP1G+hKnzgoO8ViAgGU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIBzTCCATagAwIBAgIQHYBpoynYcYpB1zAtPuky+zANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDHhoAVgBBAE4ASABVAEwAVABFAE4AXABtAGEAeDAeFw0xMzAyMjgxMDAyNThaFw0xNDAyMjgxNjAyNThaMCUxIzAhBgNVBAMeGgBWAEEATgBIAFUATABUAEUATgBcAG0AYQB4MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCPhkzi53ew+UDGik1CJgd6Dh+D7dNIQdYhauM1XjsXcp49v6c61huXPucTOmWrkc+ZfmDKhq6qmZ6XIHjneXk3od3pZ8e7JmlAHoRLFW6Ij1dLcv9ZcytrNGPYR4TGekR2yVUnHfaUiet6D+vAMfPn184/Ub6EqfOCg7xWICAZQIDAQABMA0GCSqGSIb3DQEBCwUAA4GBAGIPyDRw+3ORyEMFenNwwOKY2pb5XJ4+VfWZ1qsajyvEOxhQRIsQc04XhSeTLqa2hWumXHSQ/GgKMf4cR03cMBRwIVQxY03YmnoiLxqfkbzSAQMLrSKp7jychp+oODkuIKBruLdNLB/xlAv09dJac28sUG6p+8uAObL9HZDkhgr6</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly>

2 个答案:

答案 0 :(得分:2)

Windows XP计算机是否安装了SP-3,并且所有Windows都更新了吗?那么,是否安装了.NET 3.5?

答案 1 :(得分:0)

更改签名算法。右键单击Project-&gt;属性 - &GT;签名,重新选择或重新创建证书。之后,签名算法将更改为sha1RSA。

http://social.msdn.microsoft.com/Forums/windows/en-US/f5b934d2-e8b9-4401-b038-b84aefbdf836/clickonce-exception-reading-manifest?forum=winformssetup