1

I've deployed a ClickOnce application several years ago with the ClickOnce to production. The (purchased) certificate expired a few days ago. I bought a new certificate and I installed it on my machine. I tried to deploy the application, and I see a prompt that warns me about the different key used in the previously deployed application.

I read this in order to solve this problem: Certificate Expiration in ClickOnce Deployment which is not maintained anymore. According to the documentation if I target .NET 4.0 there should be any problem. So I overwrote the previous deployed application and now, in (my test environment) the user is getting "Application cannot be started. Contact the application vendor." and in the details I get this:

Below is a summary of the errors, details of these errors are listed later in the log. * Activation of C:\Users\User\Desktop\Appname.appref-ms| resulted in exception. Following failure messages were detected: + The deployment identity does not match the subscription.

COMPONENT STORE TRANSACTION FAILURE SUMMARY No transaction error was detected.

WARNINGS There were no warnings during this operation.

OPERATION PROGRESS STATUS * [12-May-17 12:04:33 PM] : Activation of C:\Users\User\Desktop\Appname.appref-ms| has started. * [12-May-17 12:04:33 PM] : Performing necessary update check as specified by the deployment.

ERROR DETAILS Following errors were detected during this operation. * [12-May-17 12:04:33 PM] System.Deployment.Application.DeploymentException (SubscriptionState) - The deployment identity does not match the subscription. - Source: System.Deployment - Stack trace: at System.Deployment.Application.SubscriptionStore.CheckUpdateInManifest(SubscriptionState subState, Uri updateCodebaseUri, AssemblyManifest deployment, Version currentVersion, Boolean& bUpdateInPKTGroup) at System.Deployment.Application.ApplicationActivator.PerformDeploymentUpdate(SubscriptionState& subState, String& errorPageUrl) at System.Deployment.Application.ApplicationActivator.ProcessOrFollowShortcut(String shortcutFile, String& errorPageUrl, TempFile& deployFile) 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)

COMPONENT STORE TRANSACTION DETAILS No transaction information is available.

What should I do in order to avoid this very bad scenario, and how can users update their application without uninstalling the ClickOnce application?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
PhiceDev
  • 507
  • 2
  • 6
  • 22
  • 1
    Did you change the deployment url between installation of the old version and update to the new version? Afaik, when you target .net 4.0 (or higher) you can exchange the certificate without problems. Also, you can migrate your deployment to a new url. However, if both changes come to the client with the same update, the application is no longer recognized leading to the problem you are facing... – wkl May 12 '17 at 14:30
  • The deployment url has not been changed, what I realized is that the publisher name has changed, do you think it's a problem? – PhiceDev May 15 '17 at 10:37
  • I do not know, but it sounds like an explanation... – wkl May 15 '17 at 10:55
  • Did you find a solution to this? I'm having a similar problem, except in my case it won't even try to update (no prompt), and if I go and download the new version I will have both versions installed side by side. I'm using .NET 4.6.2 and VS 2017. – Juan Nov 05 '19 at 19:37

0 Answers0