zoukankan      html  css  js  c++  java
  • 针对Web.config敏感信息加密

    cd C:WindowsMicrosoft.NETFrameworkv4.0.30319
    
    
    
    ==在appSettings节点上添加==
    <configProtectedData>
    <providers>
    <add name="MyProvider" keyContainerName="自定义的密钥容器" useMachineContainer="true" 
    type="System.Configuration.RsaProtectedConfigurationProvider,System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </providers> </configProtectedData> =========================== ===自定义key=== aspnet_regiis -pc "自定义密钥容器" -exp ===对key进行授权=== aspnet_regiis -pa "自定义密钥容器" "NT AUTHORITYNETWORK SERVICE" ===解决:返回错误信息:对象已存在=== aspnet_regiis -pa "NetFrameworkConfigurationKey" "域名账户" ===对指定物理路径下web.config指定的节点加密=== aspnet_regiis -pef "appSettings" "D:config" -prov "MyProvider" ===对指定物理路径下web.config指定的节点解密=== aspnet_regiis.exe -pef "appSettings" "d:/config/"

    Net程序读取配置文件内容,无需做任何变动;会自动解密!

    参考:https://msdn.microsoft.com/zh-cn/library/2w117ede(v=vs.100).aspx

  • 相关阅读:
    Android 系统日期时间的获取
    Android What is Application
    Android 所有颜色代码
    Android onNewIntent
    Android Activity管理类
    Android 应用启动渐变效果
    算法的的代价及其度量
    算法的设计与分析
    算法的描述
    数据结构与算法(python版)教程
  • 原文地址:https://www.cnblogs.com/tianboblog/p/6323163.html
Copyright © 2011-2022 走看看