I am trying to encrypt the \"system.web.membership\" element within the Web.Config of our .Net application to secure username and password to Active Directory. I am using th
I know that your issue has already been solved, but for other people getting this error message, it seems that only certain sections of the web.config can be encrypted. I was trying to encrypt the SMTP settings in my web config:
This worked:
aspnet_regiis.exe -pef "system.net/mailSettings/smtp" "path_to_site" -prov "DataProtectionConfigurationProvider"
but these didn't:
aspnet_regiis.exe -pef "system.net/mailSettings" "path_to_site" -prov "DataProtectionConfigurationProvider"
aspnet_regiis.exe -pef "system.net" "path_to_site" -prov "DataProtectionConfigurationProvider"