我们采用命令行的方式进行加密和解密。使用ASP.NET2.0提供的命令行工具aspnet_regiis.exe,该应用程序位系统目录下Microsoft.NET\Framework\版本号\文件夹中。

    加密:
aspnet_regiis -pef "connectionstrings" "D:\WebSite"
-pef:根据文件绝对路径加密,Web.config在WebSite文件夹中。
  解密:
aspnet_regiis -pdf "connectionstrings" "D:\WebSite"
-pdf:根据文件绝对路径解密,Web.config在WebSite文件夹中。

注意:加密和解密必须在同一台计算机上完成。

相关文章:

  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
  • 2021-11-13
  • 2021-10-27
  • 2022-02-16
猜你喜欢
  • 2021-09-06
  • 2021-11-28
  • 2021-11-12
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2022-01-13
相关资源
相似解决方案