I am trying to encrypting appSettings in a external file using aspnet_regiis -pef. Does anyone how how to do this.
My main web config file :
external file ExternalAppSettings.config
I want to encrypt only appsetting in ExternalAppSettings.config how to do this ?

Midhun TpRank #388 · 6.5K reputationPosted Sep 15, 2016, 9:05 PM EDT
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Sep 15, 2016, 11:22 PM EDT
We do this all the time as we use external files for each of our environments.
First your
appSettingselement needs to look like this:Next, we call the encryption from the cmdline using:
where:
{0}is the name of your encryption provider specified in the web.config.{1}is the Id of your site in IIS