固定的app.config - VB.Net 3.5config、app、VB、Net

由网友(卑微)分享简介:我在使用Visual Studio 2008专业版创建一个VB的winform应用程序。我有一些自定义的配置设置以及在我的app.config文件中的MS SQL连接字符串。I'm using Visual Studio 2008 Pro to create a VB Winform App. I have som...

我在使用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.

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

感谢您!

推荐答案

一种方法来保护你的app.config是从窥探加密。看看这篇文章的口令加密在.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.

阅读全文

相关推荐

最新文章