Can I get certificate information from ClickOnce deployment files?

I have a ClickOnce application that has been deployed to many users who have been signed with a certificate that was located on a previous developer's computer. The certificate has expired because this developer left the company. To republish the application from another computer, we need to find the source certificate and renew it using the extension. I have access to the previous development computer, but I can not find the source .pfx file for copying and updating the certificate. I also have access to all previously deployed files.

We tried to deploy the application and received an error message:

Deployment ID does not match subscription.

My best guess is that it is actually a different certificate causing this error, based on the question and answer of the MSDN forum, Deployment ID does not match the description . However, it is worth noting that we both changed the machine with which the code is deployed, and also updated the solution for Visual Studio 2010 (the platform and configuration are the same).

How to get the initial certificate information from the previous developer machine or deployment files? Or are we possibly going down the wrong hole trying to solve this?

+4
source share
1 answer

If physical access to the machine / user account is available, there should be no problem obtaining a certificate if it was not protected by a user password during import. The export wizard can be launched from Internet Explorer settings, as shown in the figure. Look at the certificate you need on one of the tabs (usually on the Personal tab). Use the PFX format to export both private and public keys.

enter image description here

Another way to access the Export Wizard is through the MMC snap-in .

[UPDATE] . For completeness, it is not possible to obtain the private key from the signed deployment file, since it contains only the public part of the encryption key. Perhaps in the case of OP, the private key is still there, somewhere in the file system of the development machine (like the .VVK file), although it would be bad practice to store it like that. More information about certificate file types can be found here . I would prefer both private and public keys to be found in the machine certificate store, as described above.

+3
source

All Articles