如何创建远程设置文件? [英] How to create remote settings file?

查看:58
本文介绍了如何创建远程设置文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基于Windows窗体的应用程序,它有SQL数据库。



SERVER Machine Has(Windows PC):应用程序&数据库文件& SQL Server

客户机具有:仅应用程序



服务器是否:允许远程连接到sql server

客户端是:使用应用程序&连接服务器数据库或sql server



我想创建设置文件&它将通过网络用于通过远程连接与TCP / IP连接sql服务器



设置如sql server name,数据库文件名,用户名密码等。



我知道这可以通过以下方式完成:

1)在服务器机器中存储设置文件&通过netwrok分享

2)Newtwork Registry



哪个选项对我来说更好?哪个更可靠?



我的尝试:



目前我试图通过tcp / ip手动编写服务器名称&等我需要设置文件,如服务器名称数据库名称等。



我在每个客户端安装应用程序,这个应用程序将同步到存储在服务器机器中的服务器数据库。



请建议一个选项。

解决方案

我不确定存储设置文件网络上的用户名和密码是个好主意。总的来说,您应该避免在客户端服务器环境中使用硬编码的共享用户帐户。



如果您将密码存储在一个文件中,即使是加密的,您也需要能够对其进行解密才能使用它。基本上这意味着任何有权访问该文件的人都可以找出密码



连接到SQL Server时,您有两种选择:

- 如果使用SQL Server身份验证,则可以询问最终用户的用户名和密码。

- 最好使用Windows身份验证,以便AD负责实际的用户身份识别。

I have one windows form based application which has SQL Database.

SERVER Machine Has(Windows PC):Application & Database File & SQL Server
Client Machine Has:Only Application

Server Does:allows Remote connection to sql server
client Does:use application & connect with server database or sql server

i wants to create setting file & it will be used through network to connect sql sever via remote connection with TCP/IP

settings like sql server name,database file name,username password etc.

I know this can be done using:
1) Store setting file in server machine & share via netwrok
2) Newtwork Registry

which option is better for me & which is more reliable?

What I have tried:

currently i am trying to conncet to sql server via tcp/ip manually writing sever name & etc but i need setting file like server name database name etc.

I am installing application in each client and this application will conncet to server database which is stored in server machine.

Please Suggest one option.

解决方案

I'm not sure that storing a setting file with username and password on the network is a good idea. In overall you should avoid hard coded, shared user accounts in a client server environment.

If you store the password in a file, even encrypted, you need to be able to decrypt it in order to use it. Basically this means that anyone who has access to the file can also figure out the password

When connecting to SQL Server you have two options:
- If you use SQL Server authentication, you can ask the user name and the password from the end user.
- Preferably use Windows authentication so that the AD takes care of the actual user identification.


这篇关于如何创建远程设置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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