简体   繁体   中英

Connecting to a SQL Server on the Web

My company had a machine running SQL Server hosted by a company specializing in such. We have an .NET application that connects to it.

Recently the decision was made to bring the machine in house.

If we use the internal IP of the machine to connect, it works. When we go to an outside network and use the machine's external IP, it fails. The machine answers pings, and all of the ports in the following article have been opened.

http://support.microsoft.com/kb/287932

Any ideas?

are you sure that the server is configured to accept tcp connections? open teh "SQL Server Configuration Manager". "Protocols for MSSQLSERVER" (in the tree) be sure that TCP/IP i set to enabled.

您可能需要转到“ SQL Surface Area Configuration”,在树状视图中单击“ Remote Connections”,然后选中“ Local and Remote Connections”单选按钮。

Firewalls

I assume you have enabled TCP/IP, and also the SQL Browser Service .

Also I assume if behind a router/NAT, you have done the required Port triggering/Port forwarding.

The final thing would be make sure all firewalls allow SQL Server through.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM