ASP.NET website moved - problem

defuseme2k

[H]ard|Gawd
Joined
Oct 7, 2004
Messages
1,074
First off, I am no web developer. I know some vb.net, but that isn't my problem. I've moved a website to a new server, but when I try to run the website, I throw an exception almost immediately after the login page. It has to do with the ecnryption you can do on parts of the web.config from what I can tell. Here is the error I'm getting specifically:

Parser Error Message: Failed to decrypt using provider
'RsaProtectedConfigurationProvider'. Error message from the provider:
The RSA key container could not be opened.

I've googled on this quite a lot, but I'm not really finding any help on 'moving' a website, but more information on what to do when creating the encryption to start with. From what I've read, the encryption is based on a user account or the machine account on the computer it came from. Which worries me that I might not get this working. The person who did the work originally is no longer here. Is it possible to just migrate the machine keys out of the all user's profile to a new server without issue?

ANY help would be most appreciated, and sorry for the n00bness.
 
I think you can use aspnet_regiis.exe to export the keys from the old server and import them to the new server.

http://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx (see the -px and -pi arguments).

Alternatively, if you still have the old server around, you can decrypt the parts of the Web.Config XML file that were encrypted, and then put all that unencrypted data into the file on the new server, and then encrypt the file (-pdf argument)
 
Thank you for your reply. My only confusion from looking at this, is that it wants me to specify the container, which I guess I don't know. It appears he could of named it anything when he ran the commands to begin with, so I may have to call and beg him for that information, unless somehow I can see them for myself?
 
Back
Top