Click here to Skip to main content
15,869,857 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My web.config file contains many database connection string. I have a process to add more connection strings to the config file through my app. To do so though i first have to decrypt the file and then add the connection and then encrypt it back.

What I have tried:

Even though the whole process of adding a new connection string takes about 4-5 seconds, I was wondering if there's any way i can do this without having to decrypt the file when adding new connection strings. I use the Aspnet_regiis.exe tool to encrypt and decrypt the file.
Posted
Updated 25-Feb-19 4:13am
v2
Comments
Richard MacCutchan 26-Feb-19 11:11am    
If it was easy to write unencrypted (or even encrypted) data into an encrypted file, then there would be no point in encrypting it in the first place.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900