migrating cryptography key to new server

Topics: Building and extending application blocks, Cryptography Application Block, Enterprise Library Core, General discussion
Apr 4, 2011 at 5:29 PM

I have built a new web server from scratch to add into our server farm.  I've migrated everything over with ease and everything works - except the payement page (e-commerce website) in which we encrypt the credit card information when its inserted into database.  The first error I received was that the key was not valid in the specified state.  This was caused obviously because you can't xcopy a key that was generated on another server over.  So I installed Enterprise library 3.1 on one of the working machine, exported the key to a password proteted file, and re-imported it on the new server using Ent Lib 3.1, saved the config, and restarted iis.  Now I get "The value can not be a null or empty string. Parameter name: symmetricInstance".  That same error appears if I reference a non-existant key file in the web.config.  

 

What am I doing wrong?  Am I missing a step?


Apr 5, 2011 at 1:12 AM

It should work, it might be a cause of missing a basic step although I can't tell exactly what it is.  Could you try importing the key file on a simple console application and see if you'll be able to encrypt/decrypt using using that?

 

Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com