加密:
在命令提示符下键入:
aspnet_regiis -pef connectionStrings 要加密的web.config完整路经
演示样例:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>aspnet_regiis -pef "connectionStrings" "D:\Scode\cpb2cNew\branches\trunk\src\client\CP.Client"
解密:
在命令提示符下键入:
aspnet_regiis -pdf connectionStrings 要解密的web.config完整路经
演示样例:C:\Program
Files (x86)\Microsoft Visual Studio 10.0\VC>aspnet_regiis -pdf "connectionStrings"
"D:\Scode\cpb2cNew\branches\trunk\src\client\CP.Client"
web.config中的邮件配置相同能够像连接字符串一样进行加密和解密。
加密:aspnet_regiis -pef system.net/mailSettings/smtp D:\Scode\cpb2cNew\branches\trunk\src\client\CP.Client
解密:aspnet_regiis -pdf system.net/mailSettings/smtp D:\Scode\cpb2cNew\branches\trunk\src\client\CP.Client