Updating the Application Runtime
After you write your application to deny updates, you must update the application runtime according to the procedure outlined in this topic. For this procedure, you must make changes in the Web.config file of the application runtime, as well as the Profiles Web service Web.config file.
The application runtime and Profiles Web service must have the same encryption keys to function properly. If you update one, you must update the other at the same time.
To update the application runtime
Store the newly generated public key hex string as the publicKey.
Store the newly generated private key hex string as the privateKey.
Update the keyIndex so that the value that is not the current value becomes the new value. That is, if the keyIndex is 1, it becomes 2; if the keyIndex is 2, it becomes 1.
The privateKey that becomes the current privateKey (privateKey1 if keyIndex=1, privateKey2 if keyIndex=2) takes the value of the new private key hex string.
Do not delete the old publicKey and privateKey values until after the profile data has been re-encrypted. Doing so will leave you unable to decrypt the old data.
After the Web.config files have been updated, you must reinitialize the run-time application and the Profiles Web service so that the new key values are read from the repository.