开发者

Connect to SQL Server 2008 on web server

I have a ASP.NET application which is in a web server. I want my applica开发者_运维知识库tion to connect to SQL Server which is in my local machine. How is it done using TCP/IP. I tried specifying the IP address of my local machine in the Server section and added the exception in the firewall etc. But I am getting error all the time.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)


  1. The IP of your local machine has to be a static IP
  2. On firewalls of WebServer and your local machine add exceptions to PORT 1433, 1434 both incoming and outgoing
  3. Ensure that you have correct Username and password


If you could post your connection string might help, but make sure it has Network Library=DBMSSOCN in it and "Data Source=your ip here,1433".

I believe port 1433 is the default for SQL Server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜