I get the following error when trying to connect to SQL Server:
Cannot connect to 108.163.224.173.
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) (Microsoft SQL Server, Error: 1326)
This error is thrown when I try to configure my database to gridview in Visual Studio 2010. I'm at a loss as to how to debug this error.
How would you debug this error? What steps should I take in order to determine what is really going on here, in addition to the one mentioned in the error message?
Summary
To fix this issue encountered while running local app vs remote database, use SQL Server Configuration Manager to add an alias for the remote database.
Details
I had run into this problem recently when transitioning from a Windows 7 to a Windows 10 laptop. I was running a local development and runtime environment accessing our Dev database on a remote server. We access the Dev database through a server alias setup through SQL Server Client Network Utility (cliconfg.exe). After confirming that the alias was correctly setup in both the 64 and 32 bit versions of the utility and that the database server was accessible from the new laptop via SSMS, I still got the error seen by the OP (not the OP's IP address, of course).
It was necessary to use SQL Server Configuration Manager to add an alias for the remote Dev database server. Fixed things right up.
I got Solution for me :
It Will Work...
Press
window + R (Run window Open)
and in run window type"services.msc"
and new services open findSQL SERVER(SQLEXPRESS)
service start and try again it works for me Hope Its Works for You also.I had the same error when I wanted to run my WinForms project (that includes working with a SQL Server database and that worked perfectly on my PC) on another PC. The problem was in Windows Firewall on my PC. I solved this by adding two rules. This is the whole procedure how to allow SQL Server through Windows Firewall:
services.msc
firewall.cpl
, click allow an application or add rule, add the previously copied path (there is a procedure you need to follow), check Domain and Private, uncheck Public.This is the YouTube link where you can see this procedure: Allow SQL Server through Windows Firewall
You can test the following methods.
In the middle tab find the record that 'local Port' is 1433, If you can't found it try to created it with following levels
If you're encountering this while debugging in Visual Studio, make sure that the project build path points to a local drive, or follow these steps to grant permissions to the network folder.