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 deniedThis 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:
- Open File Explorer.
- Navigate to C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys.
- Right-click the folder and select Properties.
- Open the Security tab.
- Click Edit.
- Add the account running Studio Pro.
- Grant Read and Write permissions.
- Click Apply and then OK.
- Navigate to C:\ProgramData\Microsoft\Crypto\Keys.
- Repeat steps three through eight.
- Restart Studio Pro.
- 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
0 Comments