<-- Back

How to resolve CryptographicException: Access denied when using a PFX certificate

Introduction

This article explains how to resolve the following error when using a Personal Information Exchange (PFX) certificate in Studio Pro:

System.Security.Cryptography.CryptographicException: Access denied

This error occurs when Studio Pro cannot access the private key associated with the certificate.

Environment

Studio Pro (all versions)

Instructions/Procedure

Windows stores private keys for PFX certificates in protected system directories. Grant the required permissions to the account running Studio Pro to allow access to the private key by following the steps below:

  1. Open File Explorer.
  2. Navigate to C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys.
  3. Right-click the folder and select Properties.
  4. Open the Security tab.
  5. Click Edit.
  6. Add the account running Studio Pro.
  7. Grant Read and Write permissions.
  8. Click Apply and then OK.
  9. Navigate to C:\ProgramData\Microsoft\Crypto\Keys.
  10. Repeat steps three through eight.
  11. Restart Studio Pro.
  12. Retry the operation that uses the PFX certificate.

For improved security, grant permissions to the specific private key file instead of the entire directory whenever possible.

If administrative privileges are required to modify the permissions, contact the system administrator or IT team.

Outcome

Studio Pro can access the private key associated with the PFX certificate, and certificate-related operations complete successfully.

Internal information related

  • 261480, 65941

Additional information

Not Applicable

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.