How to resolve “Network-related or instance-specific error" while establishing a connection to a SQL Server on a remote computer on the home network.
I have two laptops (both running Windows 10, 64-bit) that are connected to my home network using wifi. Here are details about each laptop: Laptop #1: Laptop #2: I want Laptop #1 to be the server and Laptop #2 to be the client connecting to that server. These are this I ensured on Laptop #1: Pinging 10.0.0.53 which SUCCEEDED. Enable TCP/IP in SQL Server Configuration Manager. Inside TCP/IP Properties, under ‘IPAll’, ‘TCP Dynamic Ports = [Blank]’ (I cleared it), and’ TCP Port = 1433’. I also went into SQL Server Services and restarted the SQL Server service. Inside TCP/IP Properties, under ‘IP8’, ‘Active = Yes’, Enabled = ‘Yes’, TCP Dynamic Ports = [Blank], TCP Port = 1433. Created an inbound Windows-Firewall rule for TCP Port 1433 with a "Private" group. In Laptop #1's SQL Server Management Studio, under Server Properties > Security, Server authentication = SQL Server and Windows Authentication mode. In Laptop #1's SQL Server Management Studio, under Server Properties > Connections, Remote server connections = Allow remote connections to this server [ticked]. I've added a user to my database and allowed him to read/write to tables. Following things I tried from Laptop #2: Pinging 10.0.0.5 which SUCCEEDED (all packets came through) Server name: 10.0.0.5SQLEXPRESS,1433, Authentication = SQL Server Authentication, Login = ..., Password = ... No windows firewall rules were created. In SQL Server Configuration Manager (I enabled TCP/IP and noted that IPAll::TCP Port = 1433 and IPAll::TCP Dynamic Ports = [Blank] But still, I am getting the following error:
By default named instances are bound with dynamic ports and the SQL Browser service is the one that redirects the client connections to named instances. For this to happen you need to ensure the following: Ensure SQL Browser service is running Create a rule in windows firewall (where SQL Service and SQL Browser services are installed) to accept in-bond communication on port numbers UDP: 1434 and TCP:1433 You could also make connections without relying on SQL browser service. For that, you must configure the custom port and use port number in connection string instead of instance name (example: 10.0.0.5,1435)
Once you get this message (['any' 1433]) in the SQL Error log, the SQL server is ready to accept connections, but in your case, there is something else blocking your connections. Most probably it's a firewall, Create a rule (as mentioned above), do telnet again, if it works, you should be able to make the connection. If you are unable after firewall entry, make sure there is no network-level blocking happening on those specific port numbers.
I enabled Telnet Client on Laptop #2's PowerShell but could not connect to the host 10.0.0.5:1433. Until telnet succeeded the connections could not be established. Why is there a network-related or instance-specific error occurred while establishing a connection to sql server? Your connection string was probably overridden when you copied your new website version on the server. Please check the connection string on the web. config and see if it is valid.