在注册表中存储连接字符串? [英] Storing Connection Strings in Registry?

查看:25
本文介绍了在注册表中存储连接字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们决定使用注册表来处理我们在 VB.net 应用程序中使用连接字符串的部署.

We decided to use the registry for handling our deployment with connection strings in our VB.net application.

要求是:

  1. 如果程序无法连接到服务器,请首先检查注册表中的连接字符串.如果没有,请创建文件夹并填写名称、类型和数据.
  2. 确保已加密.

我从未在注册表中编辑或创建过任何内容.我从哪里开始?如果有人有任何代码示例或文章链接,我将不胜感激.

I have never edited or created anything in the registry. Where do I start? If anybody has any code samples or links to articles I would really appreciate it.

推荐答案

看起来本教程将是一个 该问题的良好来源. 我强烈建议不要将连接字符串存储在注册表中.它增加了对当前操作环境的更多工作和更多依赖.此外,配置文件更便携,更适合存储与属性相关的信息.如果您使用设置文件,支持管理员和您的支持人员会感谢您.[与将信息放在注册表中相比.

It looks like this tutorial would be a good source for the problem. I would strongly recommend against storing the connection string in the registry. It adds more work and more dependencies on the current operating environment. Additionally, configuration files are more portable and are better suited for storing property related information. If you use a settings file the supporting admins and your support people will thank you. [Compared to placing the information in the registry.

这篇关于在注册表中存储连接字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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