none
ClickOnce - Exception reading manifest RRS feed

  • Question

  • Hi,

    I published my application with ClickOnce and it worked on some computers and not on others.

    It worked on Windows 8 and Windows 7 (The development PC).

    It didn't work on Windows XP or a fresh Windows 7.

    I have not tested Vista yet.

    I looked up this problem and looks like quite a few people get this, but none of the solutions helped me.

    I changed the platform to .Net Framework 3.5 to accomodate the Windows XP users.

    I am not a full time application developer so excuse me if it is something simple I missed. I tried everything I could find on the net about this problem, so any suggestions and help would be appreciated dearly.

    Below is the log for the Windows XP machine:

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

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

    ERROR SUMMARY
    Below is a summary of the errors, details of these errors are listed later in the log.
    * Activation of E:\Konkordansie\Konkordansie.application resulted in exception. Following failure messages were detected:
    + Exception reading manifest from file:///E:/Konkordansie/Konkordansie.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
    * [2/3/2013 6:56:21 PM] : Activation of E:\Konkordansie\Konkordansie.application has started.

    ERROR DETAILS
    Following errors were detected during this operation.
    * [2/3/2013 6:56:22 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
    - Exception reading manifest from file:///E:/Konkordansie/Konkordansie.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.


    Sunday, February 3, 2013 5:10 PM

Answers

  • Hi Bremer,

    According to platform version information, the os is the Windows XP and .net framework is 4.0.

    The issue occurs due to the application file, the hash for that file was generated using SHA-256 algorithm.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 more details, see http://blogs.msdn.com/b/smondal/archive/2012/08/24/signaturedescription-could-not-be-created-for-the-signature-algorithm-supplied.aspx

    In order to resolve the issue, you must install .Net Framework 4.5 on the target system.

    However, Windows XP doesn't support .Net Framework 4.5. You should not create a ClickOnce 4.5 application if you want it works on Windows XP as well.

    Note, after you change the target framework, the Visual Studio will not change the Signature Algorithm. Right click Project-> Properties-> Signing, re-select or recreate the certificate. After that the Signature Algorithm will change to sha1RSA.

    Best Regards,


    Bob Wu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Tuesday, February 5, 2013 7:37 AM
    Moderator

All replies

  • Hi Bremer,

    According to platform version information, the os is the Windows XP and .net framework is 4.0.

    The issue occurs due to the application file, the hash for that file was generated using SHA-256 algorithm.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 more details, see http://blogs.msdn.com/b/smondal/archive/2012/08/24/signaturedescription-could-not-be-created-for-the-signature-algorithm-supplied.aspx

    In order to resolve the issue, you must install .Net Framework 4.5 on the target system.

    However, Windows XP doesn't support .Net Framework 4.5. You should not create a ClickOnce 4.5 application if you want it works on Windows XP as well.

    Note, after you change the target framework, the Visual Studio will not change the Signature Algorithm. Right click Project-> Properties-> Signing, re-select or recreate the certificate. After that the Signature Algorithm will change to sha1RSA.

    Best Regards,


    Bob Wu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Tuesday, February 5, 2013 7:37 AM
    Moderator
  • Hi Bob,

    I read about the part that NetFX4.5 is not supported in XP and the SHA-256 algorithm needs NetFX4.5.

    But I didn't know how to change it > Your solution provided the answer.

    Thanks so much!

    Bremer

    Tuesday, February 5, 2013 6:53 PM
  • Hi Bremer,

    I'm glad it helped.

    Good day,


    Bob Wu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 6, 2013 6:59 AM
    Moderator
  • Thank you very much!   This did resolve my problem trying to run the manifest on my XP machine.

    Tuesday, April 16, 2013 5:22 PM
  • I was running into the same issue, however, after accomplishing the change in Signing and the signature algorithm switching to "sha1RSA" the setup executable fails when trying to install on a Windows XP based machine.  I also had to change the Prerequisites such that .NET Framework 4.5 was unchecked.

    I'd appreciate any help that might be offered.

    Monday, January 27, 2014 7:05 PM
  • Hi Bremer,

    I've been stuck on this same problem for a week. Then I've read your errors that matches mine. I changed my Certificate that has a signiture algorithm SHA1RSA. Then it worked.

    I'm grateful that you've posted this Bremer. You're the best.

    -Madhunter

    Friday, March 7, 2014 9:20 AM