我们如何加密 web.config 文件中的连接字符串部分?
最佳答案
为了节省访问外部链接,在 C:\Windows\Microsoft.NET\Framework\v4.0.30319 (对于 .NET 4/4.5)
aspnet_regiis.exe -pe "connectionStrings" -app "/YourWebSiteName" -prov "DataProtectionConfigurationProvider"
要使用此工具解密 connectionStrings 部分,您可以在 aspnet_iisreg.exe 工具中指定以下命令。
aspnet_regiis.exe -pd "connectionStrings" -app "/YouWebSiteName"
关于.net - 在 web.config 中加密连接字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1706613/