Free Support Forum - aspose.com

CryptographicException on SetLicense

Running the latest hotfix (2.1.7.0), we are getting a CryptographicException when trying to set the license.

This user has standard “restricted user” permissions, nothing more restrictive than that. It
shouldn’t be necessary to give them elevated priveledges simply to license this component.

Any ideas?

Exception:

System.Security.Cryptography.CryptographicException

CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired.”

Here’s our stack:

at System.Security.Cryptography.RSACryptoServiceProvider…ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
at Aspose.Word.License.a(XmlNode A_0, XmlNode A_1)
at Aspose.Word.License.a(XmlDocument A_0)
at Aspose.Word.License.SetLicense(Stream stream)
at Aspose.Word.License.SetLicense(String licenseName)

If this helps, the following folder does not exist on the users’s machine:

\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys

They do have up to:

\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA

… but no “MachineKeys” subfolder.

This is from a similar post here:

http://support.sourcegear.com/viewtopic.php?t=231

So I presume you created that folder manually and it solved the problem. Thanks for reporting the issue and the solution.