Reputation: 1658
I have encrypted production connectionstring in webconfig on my development machine, and pushed it to production server. When running production application, getting Bad Data error while asp.net decrypting at server when connecting to database.
What wrong am I doing here?
Upvotes: 1
Views: 91
Reputation: 42577
Are you using RSA or DPAPI to encrypt? DPAPI is not built for encrypting on one machine and moving to another.
For RSA, you must be sure that the target production servers have a non-default and duplicated RSA encryption key on all target servers.
See this link for more information.
Upvotes: 1