简体   繁体   English

如何通过远程访问将应用程序连接到SQL Server 2008

[英]How to connect application to SQL Server 2008 through remote access

Is there any way to connect to the database which is at remote server using ASP.NET ? 有什么方法可以使用ASP.NET连接到远程服务器上的数据库? I checked for TCP/IP ports at remote desktop. 我在远程桌面上检查了TCP / IP端口。 They are also enabled I have tried specifying IP address and SQL Server name in the connection string but it shows the following error: 它们也已启用,我尝试在连接字符串中指定IP地址和SQL Server名称,但显示以下错误:

(provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (提供者:TCP提供程序,错误:0-连接尝试失败,因为一段时间后连接方未正确响应,或者连接建立因连接主机未能响应而失败。)

Thanks in advance 提前致谢

Must be change some configuration on Sql Server Configuration Manager 必须在Sql Server Configuration Manager上更改某些配置

  • Open Sql Server Configuration Manager And Select on tab SQL Server Network Connection 打开Sql Server Configuration Manager然后在选项卡上选择“ SQL Server Network Connection
  • Double click Protocols For ... Change to Enable YES 双击协议...,更改为启用
  • Click IP Addresses tab and set IPAll TCP Port 1433 单击IP地址选项卡并设置IPAll TCP端口 1433

1433 is a default SQL Server Port. 1433是默认的SQL Server端口。 If you want to set another port , port must be unavailable and define port on Windows Firewall With Advanced Security 如果要设置其他端口,则该端口必须不可用,并在Windows Firewall With Advanced Security上定义端口

you can also review the document about the topic here 您还可以在此处查看有关该主题的文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在c#应用程序中远程访问sql server 2008 - Remote access sql server 2008 in c# application C#Windows应用程序:使用Windows身份验证连接到远程SQL Server 2008的连接字符串 - C# Windows application: connection string to connect to remote sql server 2008 using windows authentication 在Visual Studio 2010上连接到远程SQL Server 2008 - Connect to remote SQL Server 2008 on Visual Studio 2010 C#应用程序访问远程SQL Server 2008实例…不起作用 - C# application accessing remote sql server 2008 instance … not working 如何将Windows CE c#应用程序连接到数据库SQL Server2008r2 - How to connect windows CE c# application to database SQL Server2008r2 如何使用Visual Studio 2017中编译的C#应用​​程序连接到SQL Server 2008? - How to connect to SQL Server 2008 with C# application compiled in Visual Studio 2017? 连接到SQL CE并通过API请求将数据发送到远程服务器 - Connect to SQL CE and send data to remote server through API request 如何通过网络从C#ClickOnce应用程序访问SQL Server 2008 R2 - How to access sql server 2008 R2 from C# ClickOnce application over a network 连接到远程2008服务器上的IIS配置数据库 - Connect to IIS metabase on a remote 2008 server 无法从 C# 应用程序连接到远程 SQL Server 实例 - Unable to connect to remote SQL Server Instance from C# Application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM