c# - 加密 web.config 部分

标签 c# asp.net vb.net visual-studio web-config

在 .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/

相关文章:

asp.net - LINQ 实体Where 子句位置不正确

wpf - 使对象在 MouseDown 上跟随鼠标,在 MouseUp 上跟随 "Stick"

.net - 索引无参数函数的返回值

c# - 多个字符的字符串替换

c# - TypeCatalog 的使用

c# - 如果我不关心它的返回值,我应该等待一个 'async Task' 函数吗?

c# - 如何在生成 Excel 工作表时为列值添加颜色?

c# - 如何在asp.net下异步运行持久进程?

VB.NET:哪个 As 子句与带有 Option Strict On 的匿名类型一起使用?

C# COM DLL 阻止 VBA 应用程序退出