在Windows应用程序中隐藏.config文件 [英] hide .config file in windows application

查看:153
本文介绍了在Windows应用程序中隐藏.config文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我有一个具有.configfile文件的Windows应用程序.
我想将.config文件隐藏到我的exe文件中.
因为我的.config包含关键数据.

我该怎么办


非常感谢您的回答.

Hi I have a windows application that have .configfile file.
I want to hide .config file in to my exe file.
because my .config contains critical data.

how can i do it


thanks a lot for your answer.

推荐答案

如果您的关键信息是STATIC(意味着它不会改变或说您不会经常更新),那么一种方法是将此作为资源嵌入....

但是...

我有点惊讶,如果数据是静态的,那么为什么您首先需要一个配置文件.
If your critical information is STATIC (means it wont change or say if you wont update it often), then one way is to embedd this as a resource ....

BUT ...

I am little bit suprised, If the data is static why you require a config file at the first instance.
Don''t we use these .configs to customize our app ??


为什么我们不使用这些.configs自定义应用程序?为什么不宁愿对app.config文件中的敏感信息进行加密.
这里是一些链接
http://social.msdn.microsoft.com /Forums/zh-CN/netfxbcl/thread/08153cf1-41b6-4472-875b-803f0845a4e1/ [加密Windows窗体应用程序的app.config文件 [ ^ ]

如果要加密数据库字符串,请查看此链接
http://msdn.microsoft.com/en-us/library/89211k9b%28v = vs.80%29.aspx [ ^ ]
Why don''t you rather encrypt your sensitive information in you app.config file.
Heres some links for that
http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/08153cf1-41b6-4472-875b-803f0845a4e1/[^]
Encrypting the app.config File for Windows Forms Applications[^]

If you want to encrypt you db string take a look at this link
http://msdn.microsoft.com/en-us/library/89211k9b%28v=vs.80%29.aspx[^]


这篇关于在Windows应用程序中隐藏.config文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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