Encrypting sections of Web.Config through runCommand

Background

To ensure your application secrets remain secret on the sever, you might want to encrypt sections of Web.Config file on desk so that not everyone who has access to the server can open and read the file. Important sections of Web.Config include ConnectionString (which holds the credentials to databases) and AppSettings (which is typically used to store other API keys or secrets). Enabling encryption of Web.Config for ConnectionString is simple. Just set…