none
Application Validation did not succeed. Unable to continue.

    Question

  • I was following along with Beth Massie's video on setting up security for my
    application video number 11 in the "how do I" basics series but when
    I got to the step of publishing I ran into some issues. first of all I may not
    be entering the right user name into the Authentication tab when setting up the
    application administrator. There is no network to worry about so I used
    Admin-PC\Admin which I think is right but am not sure. It is probably pretty
    generic because I installed Win7 without worrying about that detail at the
    time.<o:p></o:p>

    The real problem comes after the setup.exe is generated and click on it an error window
    comes up and says "Application Validation did not succeed. Unable to
    continue."

    Can anyone explain what this Means and how it may be Fixed?

    In a details window it shows this--><o:p></o:p>

    PLATFORM VERSION INFO
     Windows    : 6.1.7601.65536 (Win32NT)
     Common Language Runtime  : 4.0.30319.17379
     System.Deployment.dll   : 4.0.30319.17379 built by: FXBETAREL
     clr.dll    : 4.0.30319.17379 built by: FXBETAREL
     dfdll.dll    : 4.0.30319.17379 built by: FXBETAREL
     dfshim.dll    : 4.0.41031.0 (Main.041031-0000)

    SOURCES
     Deployment url   : file:///C:/Users/Admin/Documents/Visual%20Studio%202010%20Published%20Apps/Services%20Managment.application
     Application url   : file:///C:/Users/Admin/Documents/Visual%20Studio%202010%20Published%20Apps/Application%20Files/Services%20Managment.exe.manifest

    IDENTITIES
     Deployment Identity  : Services Managment.application, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0000000000000000, processorArchitecture=x86

    APPLICATION SUMMARY
     * Installable application.

    ERROR SUMMARY
     Below is a summary of the errors, details of these errors are listed later in the log.
     * Activation of C:\Users\Admin\Documents\Visual Studio 2010 Published Apps\Services Managment.application resulted in exception. Following failure messages were detected:
      + Application manifest has either a different computed hash than the one specified or no hash specified at all.
      + File, Services Managment.exe.manifest, has a different computed hash than specified in manifest.

    COMPONENT STORE TRANSACTION FAILURE SUMMARY
     No transaction error was detected.

    WARNINGS
     * The manifest for this application does not have a signature. Signature validation will be ignored.
     * The manifest for this application does not have a signature. Signature validation will be ignored.

    OPERATION PROGRESS STATUS
     * [1/2/2013 2:08:44 AM] : Activation of C:\Users\Admin\Documents\Visual Studio 2010 Published Apps\Services Managment.application has started.
     * [1/2/2013 2:08:44 AM] : Processing of deployment manifest has successfully completed.
     * [1/2/2013 2:08:44 AM] : Installation of the application has started.

    ERROR DETAILS
     Following errors were detected during this operation.
     * [1/2/2013 2:08:44 AM] System.Deployment.Application.InvalidDeploymentException (HashValidation)
      - Application manifest has either a different computed hash than the one specified or no hash specified at all.
      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
       at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, Uri& appSourceUri, String& appManifestPath)
       at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
       at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
       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 (HashValidation)
      - File, Services Managment.exe.manifest, has a different computed hash than specified in manifest.
      - Source: System.Deployment
      - Stack trace:
       at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, Hash hash)
       at System.Deployment.Application.ComponentVerifier.VerifyFileHash(String filePath, HashCollection hashCollection)
       at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)

    COMPONENT STORE TRANSACTION DETAILS
     No transaction information is available.


    • Edited by reigh7 Wednesday, January 02, 2013 10:29 AM
    Wednesday, January 02, 2013 10:28 AM

Answers

All replies

  • What type of authorisation did you select? Windows, or Forms Authentication?

    If it's Forms Authentication (which I suspect), then you don't enter a Windows user name at all, the name that you're entering is for LightSwitch to create an administrative user for you in the application.

    As for the error message, I haven't seen that before, but I'd suggest first rebuilding (not just building or running) your application, to see if that helps. Then try publishing your application again.

    It's also possible that the error is due to the backslash in the user name you entered, so when you enter a name for the administrative user, don't use any special characters, use something like administrator, or admin.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Wednesday, January 02, 2013 11:42 AM
    Moderator
  • I am at the step in the example were we use only Windows Authentication.

    I did not get to the part of setting up any roles or further Forms Authentication because the first attempt to publish resulted in the error when I tried to install what was published.


    • Edited by reigh7 Wednesday, January 02, 2013 1:24 PM
    Wednesday, January 02, 2013 12:05 PM
  • Please could you try without authentication turned on. Set the authentication to the default i.e. no authentication, publish and launch the app. Does the app load correctly?

    In LightSwitch VS 2012, there is a known issue with Windows authentication in non-domain environment. Please see the discussion at User roles - Unable to load data. The specified domain either does not exist or could not be contacted

    Thanks,

    Ravi


    Wednesday, January 02, 2013 4:06 PM
    Moderator
  • I disabled the authentication but that did not change the issue. I still get the same errorr also I am not usign LS 2012 I am using LS 2011.
    Wednesday, January 02, 2013 10:40 PM
  • In case of LightSwitch 2011, the workaround for this problem is:

    • Publish your LightSwitch application like you normally would
    • After publishing, go to the Publish folder – the folder which contains setup.exe and <projectname>.application
    • Open <projectname>.application in a text editor
    • Change the line that says
    • <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> to
    • <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
    • Save the <projectname>.application file. 

     

    Please see full details at: Application not valid - Manifest generation issue


    Wednesday, January 02, 2013 11:10 PM
    Moderator
  • In case of LightSwitch 2011, the workaround for this problem is:

    • Publish your LightSwitch application like you normally would
    • After publishing, go to the Publish folder – the folder which contains setup.exe and <projectname>.application
    • Open <projectname>.application in a text editor
    • Change the line that says
    • <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> to
    • <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
    • Save the <projectname>.application file. 

    Please see full details at: http://social.msdn.microsoft.com/Forums/en-US/LightSwitchDev11Beta/thread/786b7b7d-d31a-4831-a72e-9b45de1d3702

    Oh OK that works I know what SHA1 hash encryptin is but what is SHA265?

    Can I change it to a stronger or more recent Encryption hash say MD6? What would that code look like?

    MD6/SHA3 Artical Link

    • Edited by reigh7 Thursday, January 03, 2013 3:26 AM Link added
    Thursday, January 03, 2013 3:23 AM
  • Nice catch Ravi! :-)

    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Thursday, January 03, 2013 3:58 AM
    Moderator
  • Does this error in publishing the code always happen?
    I was just wondering why it would code in a call to an encryption type that does not exist?

    Also still wondering if there are any SHA-2 or SHA-3 canidates for updated security I can call.

    Thursday, January 03, 2013 10:09 PM