Commerce Server Blog

Build world class ecommerce applications using Microsoft Commerce Server
  •  
  • Home
  • Advertise
  • Copyright Policy
  • Disclaimer
  • About

Failed to set value for profile property cc_number

ravikanth | May 26, 2008

While developing code to store credit card information in commerce server profile, I used to get a error message – “Failed to set value for profile property ‘cc_number’ at Microsoft.CommerceServer.Runtime.Profiles.ProfileProperty.set_Value(Object value) at MyProject. AddUserCreditCard(CreditCard creditCard, String authTicket)”

It looks strange error but this error comes because of two reasons

1.    Invalid encryption keys
2.    Invalid settings in web.config.

 Commerce Server Profile system gives the flexibility to store sensitive information like credit card details, personnel details. It uses asymmetric cryptography (public-key cryptography) to encrypt / decrypt sensitive information. Asymmetric cryptography contains two keys

1.    Public key
2.    Private key

The private key is kept secret, while the public key may be widely distributed. Incoming messages would have been encrypted with the recipient’s public key and can only be decrypted with his corresponding private key. For better security of these keys, commerce server keeps them in registry. A site can have one entry of public/private key in the registry or they can share the key details with another site. You can find the key details at

HKEY_LOCAL_MACHINESOFTWAREMicrosoftCommerce Server 2007 Keys

Make sure there are valid keys in the registry. If you feel the keys are corrupted or tampered, you can use “ProfileKeyManager.exe” tool to generate a new set of keys.

The second place to check the settings at web.config. Make sure your application (from which you are calling commerce server profile subsystem) web.config has following details. 

<profiles><userProfile profileDefinition=”UserObject”userIdProperty=”GeneralInfo.email_address” organizationIdProperty=”AccountInfo.org_id” catalogSetIdProperty=”AccountInfo.user_catalog_set” userIdSource=”UPM” userIdKey=”GeneralInfo.email_address” userIdTarget=”GeneralInfo.user_id”/>
<organizationProfile profileDefintion=”Organization” organizationIdProperty=”GeneralInfo.org_id” catalogSetIdProperty=”GeneralInfo.org_catalog_set”/><encryption>
<keys keyIndex=”1″>
<add type=”publicKey” value= “registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftCommerce Server 2007 KeysDefault,PublicKey” />
<add type=”privateKey1″ value=”registry:HKEY_LOCAL_MACHINESOFTWAREMicrosoftCommerce Server 2007 KeysDefault,PrivateKey” />
</keys>
</encryption>
</profiles> 

Make sure you update Default with exact site/folder name in your web.config else you will get “Configuration error”, when you run the application. It’s good practice to change public and private keys once in 90 days. On every key change, its IT administrator responsibility to update the sensitive data is compatible with new keys else the data will become void. Watch out for this space for data migration tool.

Comments
No Comments »
Categories
Troubleshoot, commerce server 2007
Tags
cc_number, commerce server, commerce server 2007, private key, profile subsystem, public key
Comments rss Comments rss
Trackback Trackback

Sign up for Newsletter


Categories

Quiz

  • Catalog Quiz for Beginners
  • Profile Quiz for Beginners
  • Quiz 1 for Advance Users
  • Quiz for Beginners

Recent Posts

  • RCXml2Resx.exe tool stops working
  • Commerce Server Profile Importer Tool
  • Marketing Web service Exception: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM
  • Download Commerce Server 2009 Help Document
  • Commerce Server 2009 work with SharePoint 2010?
  • Failed to set value for profile property ‘email_address’.
  • ArgumentException: An item with the same key has already been added.
  • Please note that one or more items were removed from your order because the product is no longer sold.
  • How to Avoid Duplicate Orders Numbers in Commerce Server
  • Error: Microsoft.Commerce.Contracts.Faults.ItemDoesNotExistFault

Archives

  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008

Tags

add discounts add images to profile Advantages of commerce server approve discounts authentication auto login process automatic user creation basket Brand Management business tools campaign management Catalog catalog import Category CategoryConfiguration commerce server commerce server 2007 commerce server manager Commerce Server SP2 discounts ecommerce Estimation Installation inventory Kanth Koppala marketing system migration error Mojave operation components operation sequence Order subsystem Product profile profile subsystem property metadata purchase order quick checkout Ravi Ravi Kanth site cache refresh starter site tools transactions error Variant
(c) 2009 Commerce Server Blog. All rights Reserved. Articles cannot be reproduced without permission from the author.Write to me at kanth@ravikanth.net if you have any comments, questions, suggestions about this site or would like to send us a tip
About Us | Terms of Use | Disclaimer | Advertise .