固定的app.config - VB.Net 3.5 [英] securing app.config - VB.Net 3.5

查看:238
本文介绍了固定的app.config - VB.Net 3.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Visual Studio 2008专业版创建一个VB的winform应用程序。我有一些自定义的配置设置以及在我的app.config文件中的MS SQL连接字符串。

I'm using Visual Studio 2008 Pro to create a VB Winform App. I have some custom configuration settings as well as a MS SQL connection string in my app.config file.

  1. 是什么,以确保没有人可以在App.config阅读这些设置的最佳方法是什么?
  2. 是否还有其他地区的,将有一个我可能要考虑安全以及纯文本连接字符串?

感谢您!

推荐答案

一种方法来保护你的app.config是从窥探加密。看看这篇文章的<一个href="http://weblogs.asp.net/jgalloway/archive/2008/04/13/encrypting-passwords-in-a-net-app-config-file.aspx"相对=nofollow>口令加密在.NET app.config文件或这一个对的加密App.config文件为Windows窗体应用程序

One method to protect your app.config is to encrypt it from prying eyes. Check out this article on Encrypting Passwords in a .NET app.config File or this one on Encrypting the app.config File for Windows Forms Applications.

在回答你的问题的第二部分:内存!未加密的数据可以在未受保护的内存中流连,直到垃圾收集捡起来。因此,对于这个原因,你会想看看使用 SecureString的当你对付密码,连接字符串之类的类。第一篇文章谈到了这一点。

In response to part two of your question: memory! Unencrypted data can hang around in unprotected memory until the Garbage Collector picks it up. So for that reason you'll want to look at using the SecureString class whenever you deal with passwords, connection strings and the like. The first article touches on this point.

这篇关于固定的app.config - VB.Net 3.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆