cmd命令下加密:aspnet_regiis.exe -pef "connectionStrings" "你的Web.config项目路径" -prov "DataProtectionConfigurationProvider" 解密:aspnet_regiis.exe -pdf "connectionStrings" "你的Web.congif项目路径"