在 .NET 4.0 网站中,哪些 web.config 部分可以加密? 我读到并非所有部分都可以加密,但我找不到任何详细说明哪些部分可以加密。
最佳答案
来自MSDN docs ,很明显可以加密和解密 web.config
部分使用Aspnet_regiis.exe
工具与 –pe
选项和要加密的配置元素的名称,只要该部分不是以下之一:
The following is a list of configuration sections that cannot be encrypted using protected configuration: processModel, runtime, mscorlib, startup, system.runtime.remoting, configProtectedData, satelliteassemblies, cryptographySettings, cryptoNameMapping, and cryptoClasses. It is recommended that you use other means of encrypting sensitive information, such as the ASP.NET Set Registry console application (Aspnet_setreg.exe) tool, to protect sensitive information in these configuration sections.
以下是加密所有其他可能部分所需的内容:
Encrypting and Decrypting Configuration Sections
Walkthrough: Encrypting Configuration Information Using Protected Configuration
关于c# - 加密 web.config 部分,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12303590/