C# – Encrypting Web.Config

asp.netcencryptionnetweb.config

Duplicate of Encrypting config files for deployment .NET and Encrypting config files for deployment


What is the best approach and tools for encrypting information in web.config file?

Best Answer

Here are the commands to encrypt web.config file without any programming...

For encryption

aspnet_regiis -pef "Section" "Path exluding web.config"

For Decryption

aspnet_regiis -pdf "Section" "Path exluding web.config"

From this commands you can encrypt or decrypt all the section.