加密:web
在命令提示符下鍵入:加密
aspnet_regiis -pef connectionStrings 要加密的web.config完整路經spa
演示樣例:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>aspnet_regiis -pef "connectionStrings" "D:\Scode\cpb2cNew\branches\trunk\src\client\CP.Client".net
解密:code
在命令提示符下鍵入:字符串
aspnet_regiis -pdf connectionStrings 要解密的web.config完整路經io
演示樣例:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>aspnet_regiis -pdf "connectionStrings" "D:\Scode\cpb2cNew\branches\trunk\src\client\CP.Client"
class
web.config中的郵件配置相同可以像鏈接字符串同樣進行加密和解密。pdf
加密:aspnet_regiis -pef system.net/mailSettings/smtp D:\Scode\cpb2cNew\branches\trunk\src\client\CP.Client