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