加密的Web.Config

编程入门 行业动态 更新时间:2024-10-25 02:21:39
本文介绍了加密的Web.Config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

复制href="stackoverflow/questions/559995/encrypting-config-files-for-deployment-net">Encrypting配置文件用于部署.NET 和加密的配置文件进行部署

Duplicate of Encrypting config files for deployment .NET and Encrypting config files for deployment


什么是最好的方法和工具,在web.config文件加密的信息?

What is the best approach and tools for encrypting information in web.config file?

推荐答案

我相信有这样做的两种方式:

I believe there are two ways of doing this:

使用aspnet_regiis的使用 DPAPI 或的 RSA 或做它编程的。

using aspnet_regiis using DPAPI or RSA, or doing it programmatically.

该编程方法可以方便,特别是如果你也想加密的app.config。

The programmatic way can be handy, particularly if you also like to encrypt app.config.

这是我用这个经验,如果你写一个自定义配置部分,你必须安装含有类该节到GAC的DLL。对于一个项目,我的工作我基本上是照本宣科以下办法:

From my experiences of using this, if you write a custom configuration section, you have install the DLL containing the classes for that section into the GAC. For a project I was working I basically scripted the following approach:

  • 复制配置DLL海关总署。
  • 执行加密。
  • 从GAC删除配置DLL。

机会是,如果你只是加密连接字符串,那么这将不会是一个问题。您还需要您是否要在机器范围内或以问责这两个选项一个特定的用户进行加密可以根据您的情况是有益的是铭记在心。为简单起见我坚持机广泛加密。我所提供的链接解释这两种方法的优点。

Chances are if you are just encrypting connection strings then this won't be a problem. You also need to be bear in mind whether you want to encrypt on a machine wide basis or to a specific user account- both options can be useful depending on your scenario. For simplicity I stuck to machine wide encryption. The links I have provided explain the merits of both approaches.

更多推荐

加密的Web.Config

本文发布于:2023-11-07 17:33:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1567029.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Web   Config

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!