0
votes

I need to Encrypt the web.config file after publish it to the web server. The problem is, if I use asp_reg, I won't be read by the other machine/server. Does anyone have an idea how to do this? Some of my page is using SQLDataSource to read the connectionstring in the web.config file. Is this thing won't work if the web.config encrypted?

Thank you.

1
not sure why you say it wont work on another machine... ideally you can copy the original config file and then encrypt it before using in application... Have a look msdn.microsoft.com/en-us/library/dx0f3cf2%28v=vs.80%29.aspx - Amol
Do you meant, If using aspreg on Machine A then It will work also on Machine B? - Haminteu

1 Answers

0
votes

SQLDataSource will work. Content of Web.config will be decrypted automatically by ASP.NET while processing this file.