PDA

View Full Version : encrypted connection strings


gautams
11-15-2008, 02:44 AM
My website runs OK when the connection strings are unencrypted both on my local web server and when uploaded to discountasp.

When I encrypt the connection strings using aspnet_regiis the site works locally but stops working when I upload the web.config to discountasp.

The commands I've tried to encrypt the stings are:

aspnet_regiis -pe "connectionStrings" -app "/ims"

as well as:

aspnet_regiis -pef "connectionStrings" c:\code\ims

In both cases, the web.config works locally but not on the discountasp server.

Would appreciate if anyone can tell me what I'm doing wrong.

Thanks,
Gautam

More Information
=============
I know now that the encryption process uses the machine key which is obviously different across machines. So now I have generated a machine key for the server using the IIS manager. Now I'm
stuck at a new place:

1. Can I get the deployment server's machine key to my local machine so I can run aspnet_regiis?
2. Alternately, is it possible to get secure shell access to the discountasp.net server so I can run the encryption there?

Thanks,
Gautam


Post Edited (gautams) : 11/15/2008 3:21:54 PM GMT

gautams
11-15-2008, 07:47 AM
that too is solved.


thanks.

geosync
04-11-2009, 01:02 PM
What was your final process for dealing with this issue?

bruce
04-13-2009, 10:36 AM
see http://support.discountasp.net/KB/a339/how-to-encrypt-configuration-sections-your-webconfig.aspx