Export Key option in Enterprise Library Configuration fails.

Topics: Cryptography Application Block
Dec 31, 2006 at 4:51 AM
Using the Enterprise Library Configuration application, I was able to add an instance of the RijndaelManaged provider to my asp.net 2.0 website. Everything works using the various methods in the Cryptographer class in my application.

However, now I am trying to export the key, also through the Enterprise Library Configuration application. When I click the "Export Key" option and select the file location and the password, I receive a message that says:

"An error ocurred exporting the key."

It seems to create the file, but it doesn't contain any values.

Is there anything I can do to export the key? or is there something I am missing?

Jan 13, 2007 at 3:36 PM
Looks like you are following the correct procedure. There are no known problems exporting a key.

You may want to try it again using a test config file or perhaps generate a new key for your application.

There is a post in the old forums where someone got this error and then generated a new key and the problem went away. The thought was perhaps there was an error in the previous configuration file or something else unexpected going on at the time.




David Hayden
Microsoft MVP C#
Jul 17, 2007 at 8:52 AM
I've seen this happen when I try to export a User mode key. It seems that this only works for LocalMachine keys: protectedKeyProtectionScope="LocalMachine"