.net应用程序如何在lan上运行 [英] How .net applications running over lan

查看:68
本文介绍了.net应用程序如何在lan上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在vb.net中开发窗口应用程序。我的数据库是sql。我想通过LAN使用这个应用程序。通过LAN和我的数据库访问的进程也可以访问它.........



谢谢

Hi

I m developing window applications in vb.net. and my database is sql. I want to use this applications over LAN. What process to access over LAN and My database also access it.........

Thanks

推荐答案

我会 Google为此 [ ^ ]。


只需使用正确的连接字符串即可访问数据库:只要您不使用localhost,它就可以工作,前提是所有系统都在同一个LAN网段上。如果没有,那么SQL实例必须对所有人都可见,这可能意味着你需要一个特定的IP地址,甚至将数据库移到互联网上(根本不推荐)。



尝试使用服务器资源管理器窗格在VS中设置连接:

1)打开服务器资源管理器。

2)右键单击数据连接和选择添加连接

3)在随后的对话框中,选择您的数据源和数据库,指定安全信息,然后按测试连接按钮。

4)当连接工作时,按确定

5)在服务器资源管理器窗格中突出显示数据库,然后查看属性窗格。将显示连接字符串的工作示例,您可以将其复制并粘贴到您的应用程序或配置文件中。
Just use the correct connection string to access the database: as long as you don't use "localhost" it should work provided all the systems are on the same LAN segment. If not, then the SQL instance has to be visible to them all, which may mean you need a specific IP address or even to move the DB onto the internet (not recommended at all).

Try setting up a connection in VS with the Server Explorer pane:
1) Open Server Explorer.
2) Right click "Data connections" and select "Add connection"
3) In the dialog that follows, select your DataSource, and database, specify the security info, and press the "Test connection" button.
4) When the connection works, press "OK"
5) Highlight your database in the Server Explorer pane, and look at the Properties pane. A working example of the connection string will be shown, which you can copy and paste into your app or config file.


这篇关于.net应用程序如何在lan上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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