According to the ProfileContext constructor documentation, I can pass a hexadecimal representation for the private and public encryption keys, as well as the key index. This should allow for manipulation of the encrypted fields.
I have generated the keys, and they have been added to the registry. I then add the keys to the connection string in a format like this:
Provider=CSOLEDB;Data Source=mymachine;Initial Catalog=MySite_profiles;Integrated Security=SSPI;PublicKey=0001;PrivateKey=0001;KeyIndex=1
For the sake of being brief, I have truncated the Key values from above. I am reading the binary values from the registry, and concatenating each value in the format of XX, so 1 being represented as 01.
The exception being thrown during construction of ProfileContext is:
"Object reference not set to an instance of an object."
Any ideas
-jb