Feb 3, 2010

How to export a key with Microsoft Enterprise Library

If you ever need to move an encryption key for Enterprise Library from one server to another, here's how to do it. No, you can't just copy the key file.

ON THE ORIGINAL SERVER

1. Open the Enterprise Library Configuration tool from the Start menu > Microsoft Patterns and Practices > Enterprise Library 4.0


2. Open your application configuration from File > Open Application and find your exe.config file that contains your Enterprise Library configuration.



3. Select your Symmetric Provider entry and choose Export Key from the Action menu.


4. Choose a location to save your exported key file and a password to protect it.



ON THE NEW SERVER


5. Copy the exe.config file and the export key file to your new server.
6. Run the Enterprise Configuration tool and open the exe.config file
7. Create a new Symmetric Algorithm Provider in the Symmetric Provider section


8. Choose the same encryption algorithm used on the original server


9. Choose the option to "Import a password protected key file"


10. Locate your exported key file and enter the password you protected it with


11. Choose a location to save your new permanent encryption key


12. Choose machine mode if you want all accounts to be able to use this key.


13. Rename or delete the old Symmetric Provider



14. Rename the new Symmetric Provider with the name of the old Symmetric Provider


15. Save your new Enterprise Library configuration.

No comments:

Post a Comment