views:

78

answers:

1

I have copy the samples from msdn site:

http://msdn.microsoft.com/en-us/library/ms229744%28v=VS.90%29.aspx

http://msdn.microsoft.com/en-us/library/ms229943%28v=VS.90%29.aspx

I've created a certificate, but when i run the program i have this error in the Decrypt method: "Unable to retrieve the decryption key"

I've read somewhere that there is a bug in this sample because the Encrypt method don't save the decryption key. The problem is that i don't understand how can i resolve the problem.

Can you help me please?

The crypted Xml obtained is:

![alt text][1]

I suppose the problem is that doesn't exists the keyName.

[1]: http://www.freeimagehosting.net/uploads/8c603c876e.png ""

I've generated the certificate as: makecert -sk Abc -n "CN=Abc" -sr localmachine -e 06/22/2011 Abc.cer

A: 

ok, when i create the certificate i need to use this parameter:

makecert -r -pe -n "CN=XML_ENC_TEST_CERT" -b 01/01/2005 -e 01/01/2012 -sky exchange -ss my cert.cer

Andrea