Welcome to Global Trust 256 bit SSL Security Site.

  現在位置 : 技術資源 > 知識庫FAQ > CodeSign程式碼簽章 > CodeSign > Visual Studio 2005 error 'Cannot find the certificate and private key for decryption'

技術 / 資訊搜尋 

Visual Studio 2005 error 'Cannot find the certificate and private key for decryption'

Assembly Signing Using Visual Studio Project Designer's

Problem : The .pfx file cannot include certificate chaining information. (If the .pfx file does include this information, the following import error will occur: "Cannot find the certificate and private key for decryption.")

Resolution : The most common problem arises when using a .pfx file that contains chaining information. You can remove chaining information from the key file by running the Certificate Manager snap-in (Certmgr.msc), importing the pfx file into the personal certificate store, and then exporting it without including the certificate chain information. You can accomplish this by doing the following:

1. On the Start menu, click Run, type mmc, and then click OK. The Console1 dialog box appears.
2. On the File menu, click Add/Remove Snap-in. The Add/Remove Snap-in dialog box appears.
3. Click Add. The Add Standalone Snap-in dialog box appears.
4. Click Certificates, and then click Add. The Certificates snap-in dialog box appears.
5. Select My User account, click Finish, click Close, and then click OK to close the dialog boxes.
6. Expand Certificates - Current User, expand Personal and then expand Certificates.
7. Right click on the Certificates node and from the context menu select All Tasks and Import.
8. The Certificate Import Wizard appears; click Next.
9. At the File to Import step, browse and select the .pfx file and then click Next.
10. Enter private key password information, check the option to mark this key as exportable, and then click Next.
11. At the Certificate Store step, go with the defaults to place into the Personal Certificate store, click Next, and then click Finish.
12. The certificate is now imported and ready for export. Select and right click on this certificate and, from the context menu, select All Tasks and Export.
13. The Certificate Export Wizard dialog appears; click Next.
14. At the Export Private Key step, select the option Yes to export the private key and then click Next.
15. At the Export File Format step, make sure the option to include all certificates in the certificate path is unchecked and click Next.
16. At the Password step, enter desired password information and click Next.
17. At the File to Export step, specify the file name, click Next, and then click Finish.
18. This should display the export was successful dialog; click OK.

For more information please see the
Microsoft Article

技術支援系統登入 忘記密碼?


文件區 (3)
SSL 憑證 (0)
CodeSign程式碼簽章 (0)
Email憑證 (24)
隱私條款 法律聲明 安全說明連絡寰宇