Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: "Failed to Get Cryptographic Context" Error Message When You Use the Commerce Server 2002 CryptoAPI


View products that this article applies to.

This article was previously published under Q327587

↑ Back to the top


Symptoms

Commerce Server 2002 supports asymmetric encryption and one-way hashing to permit you to encrypt profile properties. When you use this encryption (by using the CryptoAPI), depending on your configuration, you may receive the following error message when you try to gain access to the profile system:
Failed to get Cryptographic context.

↑ Back to the top


Cause

This problem occurs because the ASPNET account does not have the correct permissions to gain access to the MachineKeys folder.

↑ Back to the top


Resolution

To avoid this problem, change the permissions on the C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys folder. Give the ASPNET user the following permissions on this folder, subfolder, and files:
  • List Folder / Read Data
  • Read Extended Attributes
  • Create Files / Write Data
  • Create Folders / Append Data
  • Write Attributes
  • Write Extended Attributes
  • Read Permissions
To change these permissions, right-click the folder, and then click Properties. On the Security tab, click Advanced.

↑ Back to the top


More information

If the ASPNET account has been replaced by a new local account or a domain account, you must give change the permissions for this new account on the MachineKeys folder.

↑ Back to the top


Keywords: KB327587, kbprb, kbpending, kbnofix, kbfix, kberrmsg, kbqfe, kbhotfixserver

↑ Back to the top

Article Info
Article ID : 327587
Revision : 5
Created on : 9/27/2005
Published on : 9/27/2005
Exists online : False
Views : 320