1

I have a question regarding unable to access remote database in my website web config file.

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

connectionStrings

Adesh Mishra
  • 69
  • 2
  • 2
  • 13

1 Answers1

6

On server check
1. Named pipes/TCP is enabled
2. Firewall configured for incoming connections

On Client Check
1. Can you reach the server by Ping
2. Can you connect using SQL management studio
3. Check if antivirus or firewall blocking the port

Similar question is answered earlier

Community
  • 1
  • 1
udaya kumar
  • 169
  • 8
  • 1
    1. Enable Named Pipes: SQL Config Manager -> SQL Server Network Consif -> Protocols -> Named Pipes -> Right-click -> Restart 2. firewall config: Windows Firewall with Advanced Security, on Inbound Rules, New Rule -> select Port-> select TCP. type 1433 for the default instance. -> Allow the connection ... finish ... full description is here: https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/configure-a-windows-firewall-for-database-engine-access?view=sql-server-2017 – Omid.Hanjani Jul 07 '19 at 17:40
  • in my case, need to open port 1443 – Alex W. Oct 22 '19 at 13:33