基于不同的位置从应用程序服务器与数据库服务器通信 [英] Communicating with database server from application server based on separate locations

查看:63
本文介绍了基于不同的位置从应用程序服务器与数据库服务器通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2台云服务器,两台都有Win Server 2008 R2操作系统,一台是MSSQL 2005数据库,另一台服务器是ASP.Net应用程序。请帮我连接两台服务器。我想从我的ASP.Net应用程序访问数据库。两台服务器都有独特的公共IP地址......提前致谢



从下面的评论中复制的其他内容

我有一个需要MSSQL 2005数据库的ASP.Net应用程序。如果我把ASP应用程序和数据库放在同一台计算机上它工作正常。但是现在我想在另一台计算机上移动我的数据库服务器应该用连接字符串写什么?



第二次添加

我试图直接写出我的数据库所在的计算机的IP地址。但如果在局域网中这样做它可以正常工作。如果数据库计算机在另一个网络(互联网),我尝试输入该计算机的IP,它显示无法找到服务器的错误。

I have 2 cloud servers with Win Server 2008 R2 OS on both, one is having MSSQL 2005 database and other server is serving ASP.Net application. Please help me to connect both the servers. I want to access database from my ASP.Net application. Both servers are having unique public IP addresses..... Thanks in advance

additional content copied from comment below
I have a ASP.Net application which needs MSSQL 2005 database. If I put ASP application and database on same computer it works fine. But now I want to shift my database server on another computer what should I write in connection string??

2nd addition
I tried to directly write IP address of the computer on which my database is. But if do it in LAN it works fine. And if the database computer is in another network (internet) and I try to enter the IP of that computer it shows error of cannot find server.

推荐答案

两个链接可能对您有所帮助的信息。



如何允许远程连接到SQL Server 2005 Express数据库 [ ^ ]



配置Windows防火墙以允许SQL Server访问 [ ^ ]


请注意,可能会有阻止外部访问SQL Server的防火墙和路由器。这些必须由网络管理员正确配置。
Two links with information that might help you.

How to allow remote connections to SQL Server 2005 Express database[^]

Configure the Windows Firewall to Allow SQL Server Access[^]

Note that there will probably be firewalls and routers that block external access to the SQL Server. Those will have to be properly configured by the network administrators.


这篇关于基于不同的位置从应用程序服务器与数据库服务器通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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