在Windows窗体应用程序中从Internet访问数据库 [英] Access to DB from internet in a windows form application

查看:89
本文介绍了在Windows窗体应用程序中从Internet访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好


一个

hello

in a

windows form application

我将我的数据库放在本地服务器上。



1-是否可以将db放在我的主机上,并通过我的

i put my db on a local server.

1- is it possible put db in my host in internet, and access to it by my

windows form application





2-是否可以为本地服务器设置IP,然后在客户端安装我的

?

2- is it possible to set an IP for local server then install my

windows form application

互联网(没有本地网)和从互联网访问相同的数据库? (同一本地服务器上的数据库)



谢谢



我尝试了什么:



i不测试它们。我不知道是不是可能。

in a client in internet (no local net) and access to same db from internet? (db on same local server)

thanks

What I have tried:

i don't test them. i don't know is it possible or not.

推荐答案

是的,这是可能的。



但是你永远不要把你的数据库放在互联网上(没有保护,这是一个很容易出错的高级主题,所以你不应该这样做)。
Yes it is possible.

But you should never put your database on the internet (without protection, which is an advanced topic that you can easily get wrong so you should not do it anyway).


您可以从winforms应用程序访问Internet数据库,是的 - 但这很危险,因为它会将您的数据库公开给任何能够找到它的人,并且您必须小心安全性。就个人而言,我会将一项服务添加到互联网域并与之接口,而不是直接连接到数据库。云是另一种可能性,但存在类似的安全问题。



话虽如此,许多公司通过互联网访问他们的数据库,所以你会发现很多信息如果你谷歌。



可以从互联网访问本地数据库,但强烈建议不要 - 安全性变得更加噩梦,如果你有动态IP地址,那么它就是在某些方面会失败。我建议不要这样做。
You can access internet DB from winforms apps, yes - but it's dangerous because it exposes your DB to anyone who can find it, and you have to be careful about security. Personally, I'd add a service to the internet domain and interface to that instead of direct to the DB. The cloud is another possibility, but similar security problems exist.

Having said that, many companies do access their DB's via the internet, so you will find a lot of info if you google.

Accessing your local DB from the internet is possible, but strongly not recommended - security becomes even more of a nightmare, and if you have a dynamic IP address then it is going to fail at some point. I'd advice against it.


这篇关于在Windows窗体应用程序中从Internet访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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