1

I have a ClickOnce (Windows) application that is connected to a SQL Server database. This db resides on a remote machine. Recently, I have migrated the database to a new machine. I want the application to point to this new machine. I try to change the IP of the machine on the WindowsApplication1.exe.config.deploy file but when I try to ri-install the program the following message is showing: Application manifest has either a different computed hash than the one specified or no hash specified at all. Please, can you help me how can I perform the change of the machine in this case?

Thanks, KLEDI

1 Answers1

1

In the case of modify your application file you must update manifest hash for this file and resign .application & .manifest files.

How to update and resign?

You can use Microsoft Mage.exe application. You need -Update and -Sign commands. Take a look on Remarks part, there is a lot of examples for this commands.

One of more is here:

mage -Update HelloWorld.deploy -AppManifest 1.0.0.0\application.manifest -AppCodeBase http://internalserver/HelloWorld.deploy
mage -Sign deploy.application -CertFile cert.pfx -Password <passwd>

Remember this order:

  1. -Update command
  2. -Sign command

Pfx (certificate file) you can found in your executable project files list. If you missing (.pfx) just go to your executable file Visual Studio project and go to Signing tab. Click on Create Test Certificate and use it for sign.

enter image description here

Sergey Vaulin
  • 722
  • 4
  • 16