0

I used the following command to encrypt my connection string but an error ocurred

"The connection name 'DatabaseConnectionString1' was not found in the applications configuration or the connection string is empty"

How can I encrypt it while keeping the application working?

The command used was

aspnet_regiis -pef "connectionStrings" "C:\Users\ANAS\Documents\Visual Studio 2008\WebSites\WebSite7"

What if I move the encrypted application to another computer? Will it work?

1 Answer 1

1

How can I encrypt it while keeping the application working?

You can't. If you change your web.config your application is initialized.

What if I move the encrypted application to another computer? Will it work?

It will not work. You can only encrypt config sections on the same machine you decrypted it before. That's the reason why this is secure: You can't take a config file away and decrypt it on another machine.

Sign up to request clarification or add additional context in comments.

2 Comments

Could i use Assymetric key so that i can encrypt it and decrypt it on another machine
I think you can follow this link msdn.microsoft.com/en-us/library/yxw286t2(v=vs.80).aspx and use RSA key containers to pool keys for multiple servers, but I have no experience with this procedure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.